LeetCode(数据库)- Users That Actively Request Confirmation Messages

简介: LeetCode(数据库)- Users That Actively Request Confirmation Messages

题目链接:点击打开链接

题目大意:略。

解题思路:注意 TIMESTAMPDIFF 函数。

AC 代码


SELECT DISTINCT c1.user_id
FROM Confirmations c1 JOIN Confirmations c2 ON c1.user_id = c2.user_id AND c1.time_stamp < c2.time_stamp
WHERE TIMESTAMPDIFF(SECOND, c1.time_stamp, c2.time_stamp) <= 86400
ORDER BY 1
目录
相关文章
|
数据库
数据库LeetCode每日练习(三)
数据库LeetCode每日练习(三)
数据库LeetCode每日练习(三)
|
SQL 数据库
数据库LeetCode每日练习(二)
数据库LeetCode每日练习(二)
数据库LeetCode每日练习(二)
|
SQL 数据库
数据库LeetCode每日练习(一)
数据库LeetCode每日练习(一)
数据库LeetCode每日练习(一)
|
数据库
LeetCode(数据库)- 2142. The Number of Passengers in Each Bus I
LeetCode(数据库)- 2142. The Number of Passengers in Each Bus I
198 0
|
数据库
LeetCode(数据库)- The Number of Seniors and Juniors to Join the Company II
LeetCode(数据库)- The Number of Seniors and Juniors to Join the Company II
111 0
|
数据库
LeetCode(数据库)- Number of Accounts That Did Not Stream
LeetCode(数据库)- Number of Accounts That Did Not Stream
114 0
|
数据库
LeetCode(数据库)- The Airport With the Most Traffic
LeetCode(数据库)- The Airport With the Most Traffic
126 0
|
数据库
LeetCode(数据库)- The Category of Each Member in the Store
LeetCode(数据库)- The Category of Each Member in the Store
113 0
|
数据库
LeetCode(数据库)- First and Last Call On the Same Day
LeetCode(数据库)- First and Last Call On the Same Day
114 0
|
数据库
LeetCode(数据库)- Drop Type 1 Orders for Customers With Type 0 Orders
LeetCode(数据库)- Drop Type 1 Orders for Customers With Type 0 Orders
103 0