Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Contar as ocorrências de valores DISTINCT

SELECT name,COUNT(*) as count 
FROM tablename 
GROUP BY name 
ORDER BY count DESC;