I have a simple table with millions of rows, and the columns are: Date, ID, T1, T2, T3, T4, T5, T6.
ID has values from either 1 to 10; T1 to T6 have values of either 'R', 'Y', or 'G'
For example, a record could look like: 5/15/2020 | 3 | 'R' | | 'G' | | 'G' | | 'Y' | | 'G' | | 'R' |
I try to create a new column which counts the total number of 'R' from column T1 to T6, so that in the above example, it will give 2 for that record. Is there a function to count across specific columns of a row ?