Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can an analytic function do the following? find consective days where a value was over a threshold?
kyleman wrote:
> We have table A with the following structure
>
>
> We want to find, starting from 6/7/06 number of consecutive days prior to
> that date that the value exceeded 10.
>
> for exampe
>
> ID 1 3 days 6/7-6-5
>
> ID 2 2 days 6/7-6
>
>
>
> Can an analytical function do this? We want to avoid a stored procedure for a
> variety of reasons (we have 125,000,000 rows to go thru and loading each row
> and
> comparing it to the previous and so forth will be too slow, we hope an AF will
> be faster)
Received on Thu May 11 2006 - 11:50:46 CDT