
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
본인작성 코드
select co.title, c.week, COUNT(*) from checkins c
inner join courses co on c.course_id = co.course_id
inner join orders o on co.course_id = o.course_id
where o.created_at >= '2020-08-01'
group by co.title, c.week
order by co.title, c.week
정답
select co.title, c.week, count(*) as cnt from checkins c
inner join courses co on c.course_id = co.course_id
inner join orders o on c.user_id = o.user_id
where o.created_at >= '2020-08-01'
group by co.title, c.week
order by co.title, c.week


