문제
입력 코드
SELECT
activity_date AS day,
COUNT(DISTINCT user_id) AS active_users
FROM Activity
WHERE (activity_date > "2019-06-27" AND activity_date <= "2019-07-27")
GROUP BY activity_date;
코드 설명
#SELECT #COUNT #DISTINCT #WHERE #GROUP BY
문제 출처
'SQL' 카테고리의 다른 글
#100. [LeetCode / MySQL] 596. Classes More Than 5 Students (0) | 2023.09.26 |
---|---|
#99. [LeetCode / MySQL] 1070. Product Sales Analysis III (0) | 2023.09.25 |
#97. [LeetCode / MySQL] 2356. Number of Unique Subjects Taught by Each Teacher (0) | 2023.09.23 |
#96. [LeetCode / MySQL] 550. Game Play Analysis IV (0) | 2023.09.22 |
#95. [LeetCode / MySQL] 1174. Immediate Food Delivery II (0) | 2023.09.21 |