max aggregate
510433Oct 17 2010 — edited Oct 18 2010For 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