D
Daryl
Could someone please advise if the following is possible.
I have a table of dates not all dates are represented. I would like to group
these dates into regular intervals, perhaps using the GROUP BY statement.
For example the table may hold 1 year of dates, there may be multiple dates
for the one day and there may be in some cases no entry for a particular
day. The interval must always start from the current date, the interval may
be say 20 days. The idea is to divide the data into 20 intervals from the
date the query is run and then count up the entries if the date falls into
the group/interval.
The main issue is - how do you do this always using the current query run
date as the start date for the interval? I guess I would also accept using
the latest date in the data table as the start date.
Any help would be good.
thanks
daryl
I have a table of dates not all dates are represented. I would like to group
these dates into regular intervals, perhaps using the GROUP BY statement.
For example the table may hold 1 year of dates, there may be multiple dates
for the one day and there may be in some cases no entry for a particular
day. The interval must always start from the current date, the interval may
be say 20 days. The idea is to divide the data into 20 intervals from the
date the query is run and then count up the entries if the date falls into
the group/interval.
The main issue is - how do you do this always using the current query run
date as the start date for the interval? I guess I would also accept using
the latest date in the data table as the start date.
Any help would be good.
thanks
daryl