I have the table xyz
ID day1 day2 day3 day4
1 A A P P
2 A A A P
3 A A A A
4 A P P P
I want to be able to query this and return the ID with the number of columns that have A as their value in that row. So the result would look like this:
ID Count
1 2
2 3
3 4
4 1
