题目链接:点击打开链接
题目大意:略。
解题思路:注意 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