
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
3주차 퀴즈 중 두 count 값의 비율을 구하는 것이 있었는데,
count 값들을 모두 'as'로 별칭을 달아준 후
해당 별칭을 연산에 그대로 사용하려고 하니 정의되지 않았다고 에러가 나네요.
'as'를 사용해 붙여준 별칭들은 연산에 사용할 수 없는 건가요?

SELECT count(pu.point_user_id) as pnt_user_cnt,
count(u.user_id) as tot_user_cnt,
round(pnt_user_cnt/tot_user_cnt, 2) as ratio
FROM users u
left join point_users pu on u.user_id = pu.user_id
where u.created_at BETWEEN '2020-07-10' and '2020-07-20'
SQL Error [1054] [42S22]: Unknown column 'pnt_user_cnt' in 'field list'
