Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Difficult query
Try this
select trunc(my_date+1-1/86400), avg(my_value) from t group by trunc(my_date+1-1/86400);
it seems to work fine.
vincent terrisse a écrit dans le message <37C23F89.DD06714_at_infovista.fr>...
>
>Hi,
>Could you help me building a query?
>
>Select average values by day .
>
>The PROBLEM is that values for a D day are in fact values of D-1 day
>plus value of D day at 00:00:00.
>eg: for day 08/24/1999 i average values in:
>]08/23/1999 00:00:00 (excluded); 08/24/1999 00:00:00 (included) ].
>
>thanks,
>vincent
>
Received on Tue Aug 24 1999 - 03:46:45 CDT
![]() |
![]() |