Prova:
codice:
SELECT *, COUNT(agenzia) AS tot
FROM tabella
GROUP BY agenzia
HAVING tot > 1
ORDER BY tot DESC