[thelist] Quick SQL Help Please
Rob Smith
rob.smith at THERMON.com
Thu Oct 28 08:49:41 CDT 2004
Hi,
Assume this table:
Bid ID By
3 2 John
52 1 Jane
3 3 Jim
15 1 Josh
6 3 James
2 2 Jimmy
45 1 Joan
2 3 Jack
How do I get the max bids per item showing the correct winning bidder?
The correct Results should be:
52 1 Jane
3 2 John
6 3 James
I thought it would be something like:
SELECT MAX(LatestBid) AS LatestBid, TBayBidID, MAX(Bidder) AS Bidder FROM
TBayBid GROUP BY TBayBidID Order by TBayBidID
but that's not right,
Rob Smith
More information about the thelist
mailing list