I am sure there must be a relatively straightforward way to do this, but it is escaping me at the moment. Suppose I have a SQL table like this:
+-----+-----
This could be the answer:
SELECT a, b, COUNT(*) FROM GROUP BY a,b ORDER BY 3 DESC;