Skip to main content
5 events
when toggle format what by license comment
Jul 1, 2018 at 11:11 comment added Gyuzal ok, solved this by removing extra data. What about leading 0 status? Used the same fiddle but with repeated zero statuses at 09:01 and 09:02 link here
Jul 1, 2018 at 8:48 comment added sticky bit @GyuzalR: Still works for me: SQL Fiddle. Note 'owner7' with 'device_7' at 07:07. It gets 0 minutes for 'owner_7'. But you can add HAVING sum(datediff(minute, maxts, mints)) <> 0 if you want to exclude results with 0 minutes;
Jul 1, 2018 at 8:41 comment added Gyuzal Thanks for you reply, works like a charm except the case when the day starts with a device already working, you can check by adding any working device at the top
Jul 1, 2018 at 7:53 vote accept Gyuzal
Jun 30, 2018 at 17:24 history answered sticky bit CC BY-SA 4.0