atthevilla
MIS
This is the query I'm working on:
SELECT ID, MAX(AMOUNT)
FROM GIFTS
GROUP BY ID
This gives me the correct amount but I also need the
year associated with the largest amount for each ID.
The query below which includes the year will give me only the maximum per ID per year. Is there a way to get the
correct maximum while showing the year of that particular
gift?
SELECT ID, MAX(AMOUNT), YR
FROM GIFTS
GROUP BY ID, YR
SELECT ID, MAX(AMOUNT)
FROM GIFTS
GROUP BY ID
This gives me the correct amount but I also need the
year associated with the largest amount for each ID.
The query below which includes the year will give me only the maximum per ID per year. Is there a way to get the
correct maximum while showing the year of that particular
gift?
SELECT ID, MAX(AMOUNT), YR
FROM GIFTS
GROUP BY ID, YR