Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Can u count a certain # of things that occur over a range of dates?

Can u count a certain # of things that occur over a range of dates?

From: ramdan <ramdan_at_mailexcite.com>
Date: 4 May 1999 18:55:11 -0500
Message-ID: <LMLX2.3607$tT1.124626@newscene.newscene.com>


I need to know if: Is is possible to determine which meter_ids have more than 30 consective days of -99 readings in the period from 1/96 to 12/98?

I have a 2,000,0000 row table with the following structure

meter_id         varchar
reading_dt      date
read1-24           number


meter_id        reading_date    read1   read2....read24
243344          01/01/1996      3       41       -99     4

..
243344 12/31/19998 4 -99 65 2 36456 01/01/1996 -99 -99 -99 -99
...
36456 12/31/19998 -99 -99 -99 3

each meter_id can have up to 1096 rows (one for each day from 1/96 to 1/98) some will have a value of -99 which indicates a missing read.

What I need to know is: Is is possible to determine which meter_ids have more than 30 consective days of -99 readings in the period from 1/96 to 12/98? I need at least 30 not less Received on Tue May 04 1999 - 18:55:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US