Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> GROUP BY DAY.... problem.
hi everyone,
i have a query that needs to calculate the AVG of records taken at 15
minutes interval 24/7 grouped by day for a date range. As per the
requirements the AVG needs to consider the following guidelines -
say the the time for which the data has to be avg'd up is 7:00 am to
8:00 am then the AVG would be for all data recorded at (7:15, 7:30,
7:45 & 8:00) excluding the first record at 7:00 am i.e. > 7:00 AM AND
<= 8:00 AM.
NOW the problem is that when i GROUP BY date the AVG function
calculates the average of all records for that day including the record
at 0:00 HRS and excluding the record at 24:00 HRS whence it should be
the exact opposite as per the guidelines.
Can anyone please suggest a solution?
thankyou,
rishi.
Received on Sun Feb 27 2005 - 01:33:10 CST
![]() |
![]() |