CJBIRKIN
Drink!
- Local time
- Today, 04:11
- Joined
- May 10, 2002
- Messages
- 255
Hello
I would like to do a top 5 query on a groupby query the trouble is i get the top 5 names i.e in alphabetical order rather than the top 5 highest values from the count
SELECT TOP 5 Count(TBL_ADHOC_REQUESTS.[REQUESTER ID]) AS [TOP 5 REQUESTERS], TBL_REQUESTERS.Names
FROM TBL_REQUESTERS RIGHT JOIN TBL_ADHOC_REQUESTS ON TBL_REQUESTERS.ID = TBL_ADHOC_REQUESTS.[REQUESTER ID]
GROUP BY TBL_REQUESTERS.Names;
Any ideas?
Chris
I would like to do a top 5 query on a groupby query the trouble is i get the top 5 names i.e in alphabetical order rather than the top 5 highest values from the count
SELECT TOP 5 Count(TBL_ADHOC_REQUESTS.[REQUESTER ID]) AS [TOP 5 REQUESTERS], TBL_REQUESTERS.Names
FROM TBL_REQUESTERS RIGHT JOIN TBL_ADHOC_REQUESTS ON TBL_REQUESTERS.ID = TBL_ADHOC_REQUESTS.[REQUESTER ID]
GROUP BY TBL_REQUESTERS.Names;
Any ideas?
Chris