
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
pu.point > 1000 으로 '1000' 숫자로 하면 되는데
1000대신 with 구문을 활용하여 평균값을 넣으려고 하면 에러가 납니다

작성한 코드 및 에러 메세지
with tables1 as (
select round(avg(`point`),0) from point_users
)
SELECT pu.point_user_id , pu.`point`,
(case when pu.point >= tables1 then '잘 하고 있어'
else '더 노력하세요' end)
from point_users pu
SQL Error [1054] [42S22]: Unknown column 'tables1' in 'field list'
