I have hourly data for many years, and I get different outputs in hourly, daily, weekly, monthly, quarterly, bi-yearly and yearly averages, their counts, st_dev and etc.
Most of it works fine, but I need help with this part.
1) The user wants to select different months for the quarter, for example, instead of the default JFM (jan, feb, mar) as quarter 1, they may select FMA (Feb, Mar, Apr), I have 2 text boxes to get the start and end in the format of MM/YYYY from starting at ending, but I dont know how to change these settings for the quarters.
Similarly I need to change the starting days for the weeks as well.
2) Is there any way to gey bi-yearly (half year) data, such as average, and the same problem as above, different starting and ending months.
This is the code I have for the quarterly data.
SELECT DatePart("q",[date]) AS Quarter, tbl_operation.cYear, Avg(tbl_operation.Value) AS Average, Count(tbl_operation.Value) AS n, StDev(tbl_operation.Value) AS St_Dev
GROUP BY DatePart("q",[date]), tbl_operation.cYear
ORDER BY tbl_operation.cYear;