I have a data table in mysql database which has time series data
**Table Sensor Data**
ID uuid server_time
1 a 2021-07-29 11:36:00
2 b 2021-07-29 11:36:00
3 a 2021-07-29 12:36:00
4 b 2021-07-29 11:39:00
5 a 2021-07-29 13:36:00
I want to find time difference in minutes between server_time of the all consecutive data for each uuid (ordered by server_time). For example, the query for above data would return
uuid difference
a 60
b 3
a 60
And then I want to filter all such entries where time difference is greater than 60 minutes. Is there a way to do this in timescaledb which also performant for greater than 1 million rows?