Brug en samlet forespørgsel: select g.ID, g.Name, g.Phone, count(*) over ( partition by g.name ) as Count from Guys g;