SELECT records based on return of COUNT query
This can be done using a window function:

select name, city, cnt
from (
  select name, city, count(*) over (partition by name) as cnt
  from names
) t
where cnt &gt; 1;