I have the following table structure:
uid date category (not fixed, may be A, B, C, Z, or any string)
1 2001-10-31 A
2 2001-10-31 A
3 2001-10-31 B
4 2001-10-31 B
5 2001-11-01 A
6 2001-11-01 B
7 2001-11-01 C
8 2001-11-01 C
I would like to generate a query result as of the following, what query syntax should I use:
date A B C (number of occurrence)
2001-10-31 2 2 0
2001-11-01 1 1 2
uid date category (not fixed, may be A, B, C, Z, or any string)
1 2001-10-31 A
2 2001-10-31 A
3 2001-10-31 B
4 2001-10-31 B
5 2001-11-01 A
6 2001-11-01 B
7 2001-11-01 C
8 2001-11-01 C
I would like to generate a query result as of the following, what query syntax should I use:
date A B C (number of occurrence)
2001-10-31 2 2 0
2001-11-01 1 1 2