
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
(pu.point_user_id)를 pnt로 명명하고
count(u.user_id)를 total로 명명했는데
ratio를 구하려고 나누기 할 때에 COUNT(pnt/total) as ratio는 왜 안 되는 걸까요?

작성한 코드 및 에러 메세지
오류 발생 시, 작성한 코드 전체와

SELECT COUNT(pu.point_user_id) as pnt,
count(u.user_id) as total,
COUNT(pnt/total) 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' in 'field list'
