vendredi 15 juillet 2016

How to get upper and lower data where time difference is more than 1 hour in mysql..?

I have a table having per hour table records like this :

enter image description here

As you can see every record have 1 hour difference but the highlighted one has more than one hour. I need a query which should return me both values upper (id 11379728) and lower (id 11378448) where gap is more than 1 hour.

Any help will be appreciated.

Note :- please ignore last datetime column as it serves different purpose.

Aucun commentaire:

Enregistrer un commentaire