Hi folks,
I've been using the following code, given to me by HansUp (cheers!), and it's been working great:
SELECT g.ID, Count(t.Grade) AS Total
FROM grade AS g
LEFT JOIN (SELECT Grade FROM telephony WHERE [Date] BETWEEN #08/16/2010# AND #08/20/2010#) AS t ON g.ID=t.Grade
GROUP BY g.ID
ORDER BY 2 DESC;
I'm now looking to find the TOP 5 results returned. I thought it would be as simple as:
SELECT **TOP 5** g.ID, Count(t.Grade) AS Total
FROM grade AS g
LEFT JOIN (SELECT Grade FROM telephony WHERE [Date] BETWEEN #08/16/2010# AND #08/20/2010#) AS t ON g.ID=t.Grade
GROUP BY g.ID
ORDER BY 2 DESC;
Unfortunately that's not working.
Does anyone have any ideas.
Thanks