
解析:单表显然是简单查询,由查找与昨天的温度相比温度更高的日期可得出查询条件之一是温度属性的比较。查询条件之二是昨天应该用dateDiff()函数
知识点:
datepart可省略
答案:
select p1.Id from Weather p1,Weather p2
where p1.Temperature>p2.Temperature and dateDiff(p1.RecordDate,p2.RecordDate)=1
烛残未觉 与日争辉 徒消瘦

解析:单表显然是简单查询,由查找与昨天的温度相比温度更高的日期可得出查询条件之一是温度属性的比较。查询条件之二是昨天应该用dateDiff()函数
知识点:
datepart可省略
答案:
select p1.Id from Weather p1,Weather p2
where p1.Temperature>p2.Temperature and dateDiff(p1.RecordDate,p2.RecordDate)=1