197. Rising Temperature
来源:互联网 发布:go web编程很费劲 编辑:程序博客网 时间:2024/06/13 05:20
Given a Weather
table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.
+---------+------------+------------------+| Id(INT) | Date(DATE) | Temperature(INT) |+---------+------------+------------------+| 1 | 2015-01-01 | 10 || 2 | 2015-01-02 | 25 || 3 | 2015-01-03 | 20 || 4 | 2015-01-04 | 30 |+---------+------------+------------------+For example, return the following Ids for the above Weather table:
+----+| Id |+----+| 2 || 4 |+----+
# Write your MySQL query statement belowselect w1.Id from Weather w1, Weather w2 where DATEDIFF(w1.Date, w2.Date) = 1 and w1.Temperature > w2. Temperature ;//DATEDIFF() 函数返回两个日期之间的天数。</span>
0 0
- 197. Rising Temperature
- 197. Rising Temperature
- LeetCode 197. Rising Temperature
- leetcode.197. Rising Temperature
- leetcode 197. Rising Temperature
- leetcode 197. Rising Temperature
- 197. Rising Temperature
- Leetcode 197. Rising Temperature
- 197. Rising Temperature#1
- 197. Rising Temperature
- 197. Rising Temperature--DATEDIFF()
- 197. Rising Temperature
- 197. Rising Temperature
- 197. Rising Temperature
- leetcode 197. Rising Temperature to_days()
- 【leetcode Database】197. Rising Temperature
- 197. Rising Temperature(Lettcode)
- Rising Temperature
- MathTyp使用过程的几个问题
- 软件工程中的那些图:系统流程图,程序流程图和数据流图
- POJ 2486 树形dp
- AndroidStudio导入/第一次新建项目gradle版本错误或者卡住解决方法
- 同步目录
- 197. Rising Temperature
- 自适应高度类
- dede功能模块模板路径对应表
- Map的顺序
- Android Glide 使用与问题处理
- 基于省市区展示的tableView多层展开和折叠
- 经典算法题01-百钱百鸡
- JavaScrip学习(三)---数组
- CentOS SSH无密码登录的配置