Top Five Codes

  • Thread starter Thread starter Chuck W
  • Start date Start date
C

Chuck W

Hi,
I have a table called PatientData that has PhysicianID and TreatmentID
(along with other fields) for 2008. I need to create a query that will list
the top five treatments by physician for the year. Some physicians have many
treatment IDs while a small handful may have less than five. I did a query
which does a Group By for PhysicianID and TreatmentID and then a count of
TreatmentID which gets a count of treatments by Physician. I have been
trying to add in the Top 5 into my query but am not getting the results I
need. My query results need to have five records per PhysicianID and the
count of Treatments with the exception of Physicians with less than five
treatments.

Thanks,
 
Back
Top