Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Consumption Spikes

Using Readings, find meters and reading dates where usage since the previous reading was more than double the usage in the reading before that. Return meter_id and reading_date.

Table schema

Readings(meter_id INT, reading_date DATE, kwh_total INT)

Sample data

Readings
meter_id | reading_date | kwh_total
1 | 2026-01-31 | 1000
1 | 2026-02-28 | 1120
1 | 2026-03-31 | 1180
1 | 2026-04-30 | 1400
2 | 2026-01-31 | 500
2 | 2026-02-28 | 560
2 | 2026-03-31 | 650

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.