First off, an example of what I have:
I have a table that contains 50 rows
Columns are: ndx, motor_current, t_stamp
the ndx is numbered 1 thru 50
the motor_current values are anywhere from 0 to 4000
I want to get all motor_current values that are greater than 2500
SELECT * FROM l13_motor_current WHERE motor_current > 2500
OK, now lets say I have just 10 rows of results
ndx, motor_current, t_stamp
1, 2550, 2009-08-24 12:00:00
2, 2550, 2009-08-24 12:00:02
3, 2550, 2009-08-24 12:00:04
4, 2550, 2009-08-24 12:00:06
5, 2550, 2009-08-24 12:00:08
6, 2550, 2009-08-24 12:00:10
14, 2550, 2009-08-24 12:00:24
20, 2550, 2009-08-24 12:00:34
38, 2550, 2009-08-24 12:01:04
44, 2550, 2009-08-24 12:01:14
Now I would like to filter even deeper.
I only want results that are sequencial at least 5 times. Meaning, I want the results from 1-6 but not 14, 20, 38,44.
I’m really wanting to look for motor_current over a specified value and for a certain length of time.
Any Ideas? or do I need to clarify more?