Dan, try these.
 
F/the counts :
 
SELECT ZipCode,COUNT(*) FROM DANs_TABLE GROUP BY ZipCode
 
 
If you just need the DISTINCT ZipCodes :
 
SELECT DISTINCT ZipCode FROM DANs_TABLE
 
 
If you just need the COUNT of DISTINCT ZipCodes, i.e. how many different ones are in there :
 
SELECT COUNT (DISTINCT ZipCode) FROM DANs_TABLE
 
 
HTH,
Steve in Memphis
----- Original Message -----
From: Dan
Sent: Thursday, September 26, 2002 11:45 AM
Subject: Counting Groups - 6.5+

Greetings folks.
 
I'm trying to write a line of code which displays unique data from a text column (zipcodes), followed by a count of each row, and ordered from highest to lowest. I've tried TALLEY, which works except that it's not ordered. I've also tried a SELECT DISTINCT (ZipCode), COUNT (ZipCode), but am told the command is illegal. I also tried a SELECT ZipCode, Count (ZipCode) GROUP BY COUNT (ZipCode).... and also received an error message.
 
Any suggestions?
 
Thanks,
 
Dan

Reply via email to