Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with running a count 1

Status
Not open for further replies.

TNDaffy

Technical User
Mar 26, 2001
31
US
need to run a report with a count by county
for example in my table I have a county field, so in my report I need to list each one of those county's and how many entries there are for each one. How can I get it to pull a total for each county individually?
 
SELECT count(county) as countyCount, county FROM tableName GROUP BY county

results would look like:
countyCount county
Code:
5            gwinnett
6            fulton
7            dekalb
10           forsyth

You could add any WHERE or ORDER BY that you needed as well -- ORDER BY goes after GROUP BY and WHERE goes before.

Let me know if that works for ya :)
Paul Prewett
 
ok I'm not quite with you, let me tell you this, the name of the field is Day Camp, and I'm splitting it there's 18 possible entries in that field and I want them counted seperately, to put in my report?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top