Devi SUM
e poi ORDER BY
questo valore di riepilogo:
SELECT TOP 3 ProductID, SUM(Quantity) as qSum
FROM Table
GROUP BY ProductID
ORDER BY qSum DESC
Devi SUM
e poi ORDER BY
questo valore di riepilogo:
SELECT TOP 3 ProductID, SUM(Quantity) as qSum
FROM Table
GROUP BY ProductID
ORDER BY qSum DESC