#98. [LeetCode / MySQL] 1141. 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 > "2019-06-27" AND activity_date <= "2019-07-27")
GROUP BY activity_date;

 

코드 설명

#SELECT #COUNT #DISTINCT #WHERE #GROUP BY

 

 

문제 출처

 

LeetCode - The World's Leading Online Programming Learning Platform

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com