To powinno wystarczyć: SELECT City, COUNT(CustomerID) as CustomersPerCity FROM Customers GROUP BY City