728x90
https://leetcode.com/problems/user-activity-for-the-past-30-days-i/
SELECT
activity_date AS day,
COUNT(DISTINCT user_id) AS active_users
FROM Activity
WHERE
activity_date BETWEEN DATE_ADD('2019-07-27', INTERVAL -29 DAY) AND '2019-07-27'
GROUP BY day;
728x90
'IT > 코딩테스트' 카테고리의 다른 글
[Leetcode] 9. Palindrome Number (0) | 2024.02.02 |
---|---|
[Leetcode] 2859. Sum of Values at Indices With K Set Bits (0) | 2023.09.17 |
[Leetcode] 1978. Employees Whose Manager Left the Company (0) | 2023.09.05 |
[Leetcode] 1075. Project Employees I (0) | 2023.09.04 |
[Leetcode] 2843. Count Symmetric Integers (0) | 2023.09.03 |