SQL Wybierz wiersze z nazwami 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