SQL Selecione linhas com nomes de simlar
select name, COUNT(*) as count
from (
select distinct id, name
from mytable) as sq
group by name
Stupid Ninja
select name, COUNT(*) as count
from (
select distinct id, name
from mytable) as sq
group by name