
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
두 쿼리문을 따로 실행 했을때는 정상 실행이 됩니다.
근데 inner join으로 묶으려하면 연령 부분에서 오류가 납니다
그리고 혹시 두번째 프라이스문에 group by를 달아줘야할까요??

작성한 코드 및 에러 메세지
SELECT f.price,
f.restaurant_name,
c.age
FROM food_orders f inner join customers c on f.customer_id = c.customer_id
(
SELECT age,
case when age between 1 and 20 then '청년'
when age between 21 and 30 THEN'초년생'
when age between 31 and 40 then '직장인'
when age BETWEEN 41 and 49 then '예비중년'
when age>=50 then '중년'
end as c_age
FROM customers
(
SELECT restaurant_name,
price,
case
when price <=5000 then '쌈'
when price >5000 and price <=10000 then '적당함'
when price >10000 and price <=30000 then '고려'
when price>30000 then '비쌈'
end as c_price
FROM food_orders
)a
)b
order BY
