nabil
08-08-2002, 04:35 AM
Several DBA's told me that it can be done but none is able to provide me with a query yet ...Any thoughts on that:
select from a table column1 only if column2 >1 and occured on 3 day consecutively based on date column execluding the whole record if column2 may also have vaules <=1 in same date...
for example
date column1 column2
2002-08-03 test 5
2002-08-03 test 6
2002-08-03 test 1
2002-08-03 test1 2
2002-08-03 test1 2
2002-08-03 test2 5
2002-08-04 test 0
2002-08-04 test1 5
2002-08-04 test1 9
2002-08-04 test2 3
2002-08-05 test 7
2002-08-05 test 5
2002-08-05 test1 0
2002-08-05 test2 3
In this case the query should retun only 1 records:
2002-08-05 test2 3
I really do appreciate any help at all...
Thanks
Nabil
select from a table column1 only if column2 >1 and occured on 3 day consecutively based on date column execluding the whole record if column2 may also have vaules <=1 in same date...
for example
date column1 column2
2002-08-03 test 5
2002-08-03 test 6
2002-08-03 test 1
2002-08-03 test1 2
2002-08-03 test1 2
2002-08-03 test2 5
2002-08-04 test 0
2002-08-04 test1 5
2002-08-04 test1 9
2002-08-04 test2 3
2002-08-05 test 7
2002-08-05 test 5
2002-08-05 test1 0
2002-08-05 test2 3
In this case the query should retun only 1 records:
2002-08-05 test2 3
I really do appreciate any help at all...
Thanks
Nabil