
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
SQL문을 입력을 해도 계속 오류가 뜨고 결과값이 나오질 않습니다 ㅠㅠ
해설과 똑같이 입력을 해도 해결이 되지 않습니다.

select restaurant_name,
case when price<=5000 then 'price_group1'
when price>5000 and price <=10000 then 'price_group2'
when price>10000 and price <=30000 then 'price_group3'
when price>30000 then 'price_group4' end price_group,
case when age<30 then 'age_group1'
when age between 30 and 39 then 'age_group2'
when age between 40 and 49 then 'age_group3'
else 'age_group4' end age_group
(
select f.restaurant_name,
avg(price) price,
avg(age) age
from food_orders f inner join customers c on f.customer_id=c.customer_id
group by 1
) a
order by 1
SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(
select f.restaurant_name,
avg(price) price,
avg(age) age
from fo' at line 10
Error position: line: 9
