Solved Min Date Query (1 Viewer)

theKruser

Registered User.
Local time
Today, 17:03
Joined
Aug 6, 2008
Messages
122
I have a table with many instances of FKs with associated dates. I need to run a query that groups on all FKs and returns the min date for each FK. I tried to build a query that groups by FK, then sorted the dates ascending and set return limit to 1, but as you all already know, that just returned the most min date in the source and associated FK. I can't figure this out and am banging my head against the wall. Any help would be appreciated.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:03
Joined
May 7, 2009
Messages
19,227
you are on the right path:

select FKfield, Min(dateField) As MinOfDateField From yourTable Group By FKfield;
 

theKruser

Registered User.
Local time
Today, 17:03
Joined
Aug 6, 2008
Messages
122
@arnelgp You are a genius!! Worked perfectly. Thank you!!
 

Users who are viewing this thread

Top Bottom