Re: Identifying trends

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: Sat, 21 Jul 2001 23:35:07 GMT
Message-ID: <9inmo7$8h9$1_at_news.tue.nl>


Mikito Harakiri wrote:

>

> SELECT t1.test_id
> FROM test_results t1, test_results t2, test_results t3, test_results
> t4, test_results t5
>
> where t1.test_id+1 = t2.test_id and t2.test_id+1 = t3.test_id
> and t3.test_id+1 = t4.test_id and t4.test_id+1 = t5.test_id
>
> and (t1.test_value <= t2.test_value and t2.test_value <= t3.test_value
> and t3.test_value <= t4.test_value
> or t1.test_value <= t2.test_value and t2.test_value <= t3.test_value
> and t3.test_value <= t5.test_value
> or t1.test_value <= t2.test_value and t2.test_value <= t4.test_value
> and t4.test_value <= t5.test_value
> or t1.test_value <= t3.test_value and t3.test_value <= t4.test_value
> and t4.test_value <= t5.test_value
> or t2.test_value <= t3.test_value and t3.test_value <= t4.test_value
> and t4.test_value <= t5.test_value)
and not ( t1.test_value <= t2.test_value and
          t2.test_value <= t3.test_value and
          t3.test_value <= t4.test_value and
          t4.test_value <= t5.test_value );

because otherwise you will find also the series that do not contain any exception.

-- 
  Jan Hidders
Received on Sun Jul 22 2001 - 01:35:07 CEST

Original text of this message