select top 10

S

stacie

How can I write a query to select the top 10 items most used? I have a
database with a list of patients and their diagnosis and I want to know the
top 10 diagnosis used in the table.
 
R

raskew via AccessMonster.com

Here's an example, using Northwind's Orders table, which returns the top 10
employees by count of orders per employee. You should be able to convert it
to your requirements:

SELECT TOP 10 Orders.EmployeeID, Count(Orders.RequiredDate) AS
CountOfRequiredDate
FROM Orders
GROUP BY Orders.EmployeeID
ORDER BY Count(Orders.RequiredDate) DESC;

HTH - Bob
 
Top