SQL Brain Freeze

I know I've done this before, but today, my head not think good.

I'm trying to write a simple query to pull the customer_no and cont_dt for the single largest campaign contribution (cont_amt) in a given fyear.  I've gotten this far:

SELECT o.customer_no, MAX(o.cont_dt)
FROM t_contribution o
JOIN t_campaign  g ON g.campaign_no = o.campaign_no
WHERE g.fyear = 2010
GROUP BY o.customer_no

Problem is, I don't get the cont_dt for each customer_no that I really want for my purposes.  I know this is something simple.  Any thoughts?

Thanks, Tessiturians.

BONUS BRAIN TRIVIA:  25% of a human's normal energy expenditure is spent on the brain.

Parents Reply Children