Sudden Temperature Jumps
Medium
Sensor Data Analysis
Return readings whose temperature differs by more than 5 degrees from the previous reading of the same sensor. Return sensor, ts and the change, ordered by sensor then ts.
Table schema
Readings(sensor VARCHAR(5), ts DATETIME, temp INT)Sample data
sensor | ts | temp
S1 | 2026-08-01 10:00:00 | 20
S1 | 2026-08-01 11:00:00 | 27
S1 | 2026-08-01 12:00:00 | 25
S2 | 2026-08-01 10:00:00 | 30
S2 | 2026-08-01 11:00:00 | 31
S2 | 2026-08-02 10:00:00 | 22
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.