I ve following table:
id | group | decision | category
___ _______ _________
1 | 1111 | yes | A
2 | 1111 | yes | B
3 | 2222 | no | A
4 | 3333 | yes | A
5 | 3333 | yes | C
6 | 4444 | no | A
7 | 4444 | no | B
Now I'd like to count pairs and unique categories in the following way: (A,B) = 2, (A)=1, (A,C) = 1. Is it possible to write sql query which give such result?