计算时间差
DATEDIFF() 函数
DATEDIFF(datepart, startdate, enddate) (计算时间差)
datepart:year | quarter | month | week | day | hour | minute | second | milisecond
startdata: 开始时间
enddata: 结束时间
Getdata(): 获取当前的系统日期
Mysql:datediff(被减数, 减数)
SQL Serve:(时间单位, 减数, 被减数)
Solution1
SELECT W2.Id
FROM Weather AS W1, Weather AS W2
WHERE W2.Temperature > W1.Temperature AND DATEDIFF(W2.RecordDate,W1.RecordDate)=1