Da du skal tælle distinkt navn, skal du bruge distinct
søgeord.
Prøv denne forespørgsel
select
one,
count(distinct two) as cnt
from
tbl
group by
one
SQL FIDDLE
| ONE | CNT |
---------------
| cat | 2 |
| dog | 3 |
| mouse | 1 |