
예를 들어 아래와 같은 쿼리에서,
select count(point_user_id) as pnt_user_cnt,
count(*) as tot_user_cnt,
round(count(point_user_id)/count(*),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'
count(point_user_id)를 pnt_user_cnt로,
count(*)를 tot_user_cnt로 각각 alias를 지정해 주었는데요.
round 쿼리를 쓸 때
round (pnt_user_cnt/tot_user_cnt) 라고 쓰면 안 되는 것인가요?
항상 감사합니다 :)
