Hey guys
Sorry to charge in and ask a question with my first post, but I'm extremely puzzled by some SQL and really in need of some help.
The table set up is very simple - I have just one relevant table called Gift. It has three relevant fields - giftID, giftDate and constituentID. I need to find the earliest giftID for each constituentID. Simple, ya?
So if the data was
giftID...giftDate...constituentID
3..........1/1/2006..........2
1..........1/1/2005..........2
5..........2/2/2006..........3
5..........2/2/2006..........2
8..........8/8/2006..........3
It should return
giftID....constituentID
1...........2
5...........3
I can't do this though without using several very slow subqueries which I'm finding quite annoying, because I'm sure it should be possible in one simple SQL statement.
Any help would be gratefully received! Any ideas?
Cheers
Iain


Reply With Quote
Bookmarks