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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting on the count in a report

Status
Not open for further replies.

bradx

IS-IT--Management
Sep 9, 2003
20
US
I have created a report that groups and counts our patient list by zip code. My boss is wanting the top 10 zip codes of our patient list. Is there any way that I can sort based on the group footer expression =count([zip])? Or is there a better way to get this information?

Your help would be greatly appreciated.

Brad Thibodaux
 
Generally it's
Code:
Select Top 10 ZipCode, Count(*) As CountOfZipCodes
From tbl
Order By 2
 
Sorry 'bout that ... forgot the group
Code:
Select Top 10 ZipCode, Count(*) As CountOfZipCodes
From tbl
Group By ZipCode
Order By 2
[/color
 
I apologize for my ignorance, but where would I enter this code?

Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top