May 20, 2009

Limit Groups by Number Using Transact-SQL or MS Access

imiting the number of records in a group is a common request. For example, suppose your sales director requests a custom report showing the top salesperson for each region. At first, limiting the number of records in that group seems simple: Use GROUP BY and TOP, but that doesn’t work.