Hi,
I'm trying to work out how to write a query based on the following data:
2017-03-01 15:00 | device1 | on
2017-03-01 14:00 | device1 | off
2017-03-01 13:00 | device2 | off
2017-03-01 12:00 | device2 | on
2017-03-01 11:00 | device1 | on
what i would like is everything that is "on" only, so as you can see device2 latest status is off so it wouldn't return in the query but device1 went on at 15:00 so it would be in the report as one entry at 15:00.
I'm stuck as to how to write this query, any help would be appreciated.
thanks in advance.
mike.