[지표] MAU

yozzum·2025년 2월 23일

SQL

목록 보기
31/36

[Input]

[Problem]

  • 최근 6개월 동안 매월 활성 사용자(MAU, Monthly Active Users)를 계산하라.
    즉, 각 월(YYYY-MM)마다 최소 1번 활동한 사용자 수를 구해야 한다.

[Output]

[Answer]

select date_format(event_time, "%Y%m") as yearmonth
	  ,count(distinct user_id) as cnt
from funnel
where 1=1
and event_time between current_date() - interval 6 month and current_date()
group by date_format(event_time, "%Y%m");
profile
yozzum

0개의 댓글