if(조건, 조건을 충족할 때, 조건을 충족하지 못할 때)
select restaurant_name, cuisine_type "원래 음식 타입", if(cuisine_type='Korean', '한식', '기타') "음식 타입" from food_orders
case when 조건1 then 값(수식)1
when 조건2 then 값(수식)2
else 값(수식)3 end
select restaurant_name,
addr,
case when addr like '%경기도%' then '경기도'
when addr like '%특별%' or addr like '%광역%' then substring(addr, 1, 5)
else substring(addr, 1, 2) end "변경된 주소"
from food_orders

cast(if(rating='Not given', '1', rating) as decimal)
concat(restaurant_name, '-', cast(order_id as char))
3주차 실습 문제를 스스로 풀어보면서 그래도 어느정도 이해가 되면서 풀려서 다행인데 이렇게 점점 어려워지다보니 버거워지는거같아 걱정이다.. 할수있다!!!