In the query try something like
SELECT [M1].[sales person], [M1].[ClientName]
FROM [Sales Table] AS M1
WHERE M1.[ClientName] In (SELECT Top 5 M2.[ClientName]
FROM [Sales Table] as M2
WHERE M2.[sales person] =M1.[sales person]
ORDER BY M2.[Amount] Desc)
--
\\// Live Long and Prosper \\//
BS"D
"Rob Rhatigan" wrote:
> I have a table displaying sales people, their clients(each person could have
> any number of clients), and the amount $$ each client bought from the sales
> person. I am trying to design a query to display the top 3 or 5 clients
> according to $$ for each sales person.
>
> Any Thoughts?
>
> -Rob
|