Skip to content

Commit c639004

Browse files
committed
solve problem Rising Temperature
1 parent 43ab9f1 commit c639004

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,4 +328,5 @@ All solutions will be accepted!
328328
|196|[Delete Duplicate Emails](https://leetcode-cn.com/problems/delete-duplicate-emails/description/)|[mysql](./database/DeleteDuplicateEmails)|Easy|
329329
|627|[Swap Salary](https://leetcode-cn.com/problems/swap-salary/description/)|[mysql](./database/SwapSalary)|Easy|
330330
|175|[Combine Two Tables](https://leetcode-cn.com/problems/combine-two-tables/description/)|[mysql](./database/CombineTwoTables)|Easy|
331-
|183|[Customers Who Never Order](https://leetcode-cn.com/problems/customers-who-never-order/description/)|[mysql](./database/CustomersWhoNeverOrder)|Easy|
331+
|183|[Customers Who Never Order](https://leetcode-cn.com/problems/customers-who-never-order/description/)|[mysql](./database/CustomersWhoNeverOrder)|Easy|
332+
|197|[Rising Temperature](https://leetcode-cn.com/problems/rising-temperature/description/)|[mysql](./database/RisingTemperature)|Easy|

database/RisingTemperature/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Rising Temperature
2+
We can solve this problem by DATEDIFF function and join
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Write your MySQL query statement below
2+
select l.Id from Weather as l
3+
join Weather as r
4+
on DATEDIFF(l.RecordDate, r.RecordDate) = 1 and l.Temperature > r.Temperature

0 commit comments

Comments
 (0)