I have a table like this:
id | timestamp | type
-----------------------
1 2010-11-20 A
2 2010-11-20 A
3 2010-11-20 B
4 2010-11-21 A
5 2010-11-21 C
6 2010-11-27 B
and I need to count the strings for each type, grouped by weekday; eg:
weekday | A | B | C
5 2 2 0
6 1 0 1
What would be the easiest solution for this?
I am not opposed to using views, variables, subqueries, etc.
source
share