
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
서브쿼리를 학습하던 중 with 문법을 배우면서 갑자기 오류가 발생했습니다.
선생님과 동일하게 했다고 했는데 [Table 'sparta.table1' doesn't exist] 라는 에러가 뜹니다.

with table1 as ( select course_id , count(distinct(user_id)) as cnt_checkins from checkins c group by course_id ), table2 as ( select course_id , COUNT(*) as cnt_total from orders o group by course_id ) select c.title , a.cnt_checkins, b.cnt_total, (a.cnt_checkins/b.cnt_total) as ratio from table1 a inner JOIN table2 b on a.course_id = b.course_id inner join courses c on a.course_id = c.course_id
