Hi all,

I'm a newbie and need some help with a query. I would like to get the top 3 counts for every month. I'm using Access 2010.

The table has a date which I convert to month, there is also a vendor name that I'm counting how many times it occurs every month.

I would like see the top 3 vendor names and counts for every month.




This is the query that gives me all vendors for every month.

SELECT (DatePart ('m',[DML_CREATION_DATE] )) AS [Month], [Vendor_Name], count ([Vendor_Name]) AS cnt
FROM DML_Summary
GROUP BY (DatePart ('m',[DML_CREATION_DATE] )), [Vendor_Name]
ORDER BY (DatePart ('m',[DML_CREATION_DATE] )), count ([Vendor_Name]) DESC;

I have tried to modify examples I have found for top queries by group that originally are not using the count function... without any success.

Is this even possible?


Please advise

Thanks
Erik