G
Guest
Hello I have following SQL:
SELECT qryTempeAccounts.*
FROM qryTempeAccounts
WHERE qryTempeAccounts.[Total Over 60] In ( SELECT TOP 20 T.[Total Over
60] from qryTempeAccounts As T WHERE T.marketplace =
qryTempeAccounts.marketplace ORDER BY [Total Over 60] DESC )
ORDER BY [qryTempeAccounts].[marketplace];
What I am trying to do is pull top 20 per marketplace based on the highest
over 60 days amount. (top 20 highest amount for each marketplace)
Table itself only have 73,000 records ( I don't considered this alot for
Access). I tried running it and it's been 30 minutes and still no result!
Anyone has better idea how I can get this query to run??
thank you!
SELECT qryTempeAccounts.*
FROM qryTempeAccounts
WHERE qryTempeAccounts.[Total Over 60] In ( SELECT TOP 20 T.[Total Over
60] from qryTempeAccounts As T WHERE T.marketplace =
qryTempeAccounts.marketplace ORDER BY [Total Over 60] DESC )
ORDER BY [qryTempeAccounts].[marketplace];
What I am trying to do is pull top 20 per marketplace based on the highest
over 60 days amount. (top 20 highest amount for each marketplace)
Table itself only have 73,000 records ( I don't considered this alot for
Access). I tried running it and it's been 30 minutes and still no result!
Anyone has better idea how I can get this query to run??
thank you!