I have this sql table
temp_int hum_int datetime
25.9 84 2013-10-01 11:30:00
26.4 81 2013-10-01 11:45:00
25.3 88.1 2013-10-02 11:00:00
26.3 85.8 2013-10-02 11:15:00
27.1 83.5 2013-10-02 11:30:00
27.9 81.9 2013-10-02 11:45:00
28.8 81 2013-10-02 12:00:00
26.1 80.3 2013-10-02 19:15:00
25.8 81.6 2013-10-02 19:30:00
So I want count number of times the condition is exceeded for 45 minutes. The condition is temp_int>=25 and hum_int>80, so for this example dataset must give me 1 as a result:
First one= 2013-10-02 11:00:00
Second one= 2013-10-02 11:45:00
For instance:
For this set, mysql must return one row, for instance when start the time window.