Arthur Fuller
artful at rogers.com
Fri Sep 24 06:31:19 CDT 2004
SELECT COUNT(Customers.Zip), ZipCodes.Zip FROM ZipCodes INNER JOIN Customers ON ZipCodes.Zip = Customers.ZIP GROUP BY ZipCodes.Zip Should do it. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Tuesday, September 21, 2004 2:36 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Count of records with zip I need what appears to me to be a crosstab, a COUNT of all records in a set of zip codes. In other words, I have a table of zips (about 100). I need a count of how many records in my nVLDB is in each zip code. Can anyone point me in the right direction in SQL Server? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com