Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 500 Bytes

Rising Temperature.md

File metadata and controls

20 lines (15 loc) · 500 Bytes

Hint

  • Use a SELF JOIN
  • Use the built-in DATEDIFF function to find the number of days that 2 Dates differ by.

MySQL Solution

SELECT w1.Id
FROM
  Weather as w1,
  Weather as w2
WHERE
  DATEDIFF(w1.RecordDate, w2.RecordDate) = 1 AND
  w1.Temperature > w2.Temperature

Links