codice:
SELECT A, B, COUNT(C) AS tot FROM tabella GROUP BY (A, B)