197. Rising Temperature

问题描述

解决方案

-- select A.Id from Weather A ,Weather B where  TO_DAYS(B.date)-TO_DAYS(A.Date) =1 and B.Temperature>A.Temperature 
-- select B.Id from Weather A ,Weather B where   datediff(B.date,A.Date) =1 and B.Temperature>A.Temperature 
-- select B.Id from Weather A ,Weather B where   subdate(B.date,interval 1 day) =A.Date and B.Temperature>A.Temperature 
posted @ 2016-08-11 09:33  弦断  阅读(135)  评论(0编辑  收藏  举报