Hey guys. I have a database with thousands of records in one table. There are two fields: data and value. Date is a long date formatted as dd/mm/yyyy hh:mm:ss(this was imported from excel). I am trying to write a query that will tell me, for each day, how long was the value field consecutively outside of a certain range. Example: We have 1000 data points for 5-5-11. The value field spans from 1 to 10. I need to figure out what was the most consecutive readings outside the range of 3 - 8. And then do so for every day we have data for.
Any help or direction will be greatly appreciated! Thanks in advance!!