How do you select distinct, and count of distinct? I have a table:
col1 col2
1 1
1 0
0 0
0 1
1 1
0 0
And I'm trying to get this:
col1 col2 count
1 1 2
1 0 1
0 0 2
0 1 1