
1번 문제를 저는 아래와 같이 풀었는데 with 절을 이용해서 하면 왜 에러가 나는지 모르겠습니다 ㅜㅜ
>> 에러 : SQL Error [1054] [42S22]: Unknown column 'table1' in 'field list'
with table1 as (
select avg(point) from point_users
)
select pu.user_id,
pu.point,
(case when point > table1 then '잘하고 있어요!'
else '열심히 합시다!'end ) as msg
from point_users pu
