Write a SQL query to find all dates' id with higher temperature compared to its previous dates (yesterday).
Reference: https://leetcode.com/problems/rising-temperature/
Here is my code:
SELECT L.id AS id
FROM weather AS p
INNER JOIN weather AS L ON p.recordDate = L.recorddate - 1
WHERE p.temperature < l.temperature
I don't know what's wrong with my answer, can someone help?