Query to return first and last dates by year

TimTDP

Registered User.
Local time
Tomorrow, 01:04
Joined
Oct 24, 2008
Messages
213
I have a table with the fields: dDate and Value
The table has numerous records spanning many years
I need a query that will return the first and last date for each year.

e.g
1/1/2016
15/11/2016
4/2/2017
30/12/2017
3/1/2018
30/11/2018

How do I do this?

Thanks in advance
 
Do an aggregate query grouping dates by year. Now add date field again and select Min for date. Repeat in a second query but select Max for date.
Finally UNION the two queries to get both the first and last dates
 

Users who are viewing this thread

Back
Top Bottom