8000 Update # 1141. User Activity for the Past 30 Days I.sql · dana3601/Leetcode-Problems@74d78be · GitHub
[go: up one dir, main page]

Skip to content

Commit 74d78be

Browse files
authored
Update # 1141. User Activity for the Past 30 Days I.sql
1 parent f496a27 commit 74d78be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Social Media and Posts/# 1141. User Activity for the Past 30 Days I.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
SELECT activity_date AS day, COUNT(DISTINCT user_id) AS active_users
77
FROM Activity
8-
WHERE DATEDIFF("2019-07-27", activity_date) < 30
8+
WHERE DATEDIFF("2019-07-27", activity_date) < 30 and DATEDIFF("2019-07-27", activity_date) >= 0 --Date difference must be positive
99
GROUP BY activity_date
1010

0 commit comments

Comments
 (0)
0