By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,652 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,652 IT Pros & Developers. It's quick & easy.

TOP 10 query

P: n/a
I have a table that lists donations individuals make by year.
Individuals give donations more than once a year so there are several
record per individual per year.

I'd like to create a query that will show the top 10 donors for each
year.

I've created the query below but don't know how to get it to
continue by year.

Any suggestions?

Thanks

SELECT top 10 tblGifts.[name], tblGifts.year,
Sum(tblGifts.AmountRecieved) AS SumOfAmountRecieved
FROM tblGifts
GROUP BY tblGifts.[name], tblGifts.year
ORDER BY tblGifts.year DESC , Sum(tblGifts.AmountRecieved) DESC;

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 9 Jun 2005 17:58:40 -0700, "mar10" <ma****@yahoo.com> wrote:

When you say: "... continue by year ..." do you mean you don't want to
see the annual gift, but the cumulative gift per year?

-Tom.

I have a table that lists donations individuals make by year.
Individuals give donations more than once a year so there are several
record per individual per year.

I'd like to create a query that will show the top 10 donors for each
year.

I've created the query below but don't know how to get it to
continue by year.

Any suggestions?

Thanks

SELECT top 10 tblGifts.[name], tblGifts.year,
Sum(tblGifts.AmountRecieved) AS SumOfAmountRecieved
FROM tblGifts
GROUP BY tblGifts.[name], tblGifts.year
ORDER BY tblGifts.year DESC , Sum(tblGifts.AmountRecieved) DESC;


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.