Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

max aggregate

510433Oct 17 2010 — edited Oct 18 2010
For Oracle 10g.
In addition to the following, how would I go about retrieving the amount of the max(giftdate) and the date of the max(giftamt) as columns? Do these all have to be separate subqueries?

SELECT id, MAX (giftdate) AS last_gift_date,
MAX (giftamt) AS largest_gift_amount
FROM gifts
GROUP BY id
This post has been answered by Solomon Yakobson on Oct 17 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2010
Added on Oct 17 2010
2 comments
101 views