197
找出与之前(昨天的)日期相比温度更高的所有日期的 id
。
返回结果 无顺序要求 。
表: Accounts
+-------------+------+ | 列名 | 类型 | +-------------+------+ | account_id | int | | income | int | +-------------+------+
select w1.id
from Weather w1, Weather w2
where w1.temperature > w2.temperature
and datediff(w1.recordDate,w2.recordDate)=1
datediff(date1,date2):date1与date2相隔的天数