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 should do it:
SELECT A, B, COUNT(*)
FROM TableName
GROUP BY A, B;
SELECT A, B, COUNT(*) FROM MyTable GROUP BY A, B
SELECT A,B,COUNT(*)
FROM table
GROUP BY A,B
SELECT A,B,COUNT(*)
FROM the-table
GROUP BY A,B
TRY:
SELECT
A, B , COUNT(*)
FROM YourTable
GROUP BY A, B
This could be the answer:
SELECT a, b, COUNT(*)
FROM <your table name here>
GROUP BY a,b
ORDER BY 3 DESC;