Self join on a one-day offset
SELECT
w1.id
FROM weather w1
JOIN weather w2
ON DATE(w1.recordDate) = DATE(w2.recordDate, '+1 day')
WHERE w1.temperature > w2.temperatureThis approach pairs each row with the row from exactly one day earlier, then keeps only the rows where the current temperature is higher. It is easy to reason about because the previous day is modeled directly as another copy of the same table.