Weather table, aliasing one instance as weather and the other as w.DATEDIFF() function to find pairs of records where weather.recordDate is exactly one day after w.recordDate.weather.temperature is greater than w.temperature.id from the weather table for the rows that meet the above conditions.id values corresponding to the dates with higher temperatures compared to the previous day.erDiagram
Weather {
int id
date recordDate
int temperature
}