> For the complete documentation index, see [llms.txt](https://r24zeng.gitbook.io/leetcode-notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://r24zeng.gitbook.io/leetcode-notebook/bu-chong-6180-dao/197.-rising-temperature-sql.md).

# 197. Rising Temperature(SQL)

\# Easy

```sql
# Write your MySQL query statement below
select w1.Id 
from Weather w1, Weather w2
where datediff(w1.recordDate, w2.recordDate) = 1 
    and w1.Temperature > w2.Temperature
```

{% hint style="danger" %}
时间差必须要用**datediff(date1, date2)**&#x6765;判断，此方法表明`date1-date2 = 1`
{% endhint %}
