S
S Gianni
I tried this sub-query and something must be wrong because
it is not capturing the top 5 customers per customer rep.
Attached is what I typed
SELECT [Sales Rep Sales by Customer].*
FROM [Sales Rep Sales by Customer]
WHERE ((([Sales Rep Sales by Customer].[Cust #]) In
(SELECT Top 5 [Cust #] FROM [Sales Rep Sales by Customer]
A WHERE A.[Sales Rep] = [Sales Rep Sales by Customer].
[Sales Rep] ORDER BY [Sales Rep Sales by Customer].
[SumOfTotal Sales])));
Does anybody see an error with this SQL statement?
Thank you.
it is not capturing the top 5 customers per customer rep.
Attached is what I typed
SELECT [Sales Rep Sales by Customer].*
FROM [Sales Rep Sales by Customer]
WHERE ((([Sales Rep Sales by Customer].[Cust #]) In
(SELECT Top 5 [Cust #] FROM [Sales Rep Sales by Customer]
A WHERE A.[Sales Rep] = [Sales Rep Sales by Customer].
[Sales Rep] ORDER BY [Sales Rep Sales by Customer].
[SumOfTotal Sales])));
Does anybody see an error with this SQL statement?
Thank you.