커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
4-4 실습2
엑셀보다 쉽고 빠른 SQL v0
4주차
북마크
김*연
댓글
1
추천
0
조회수
14
조회수
14
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


왜 실행이 안되는지 찾아봐도 잘 모르겠습니다 ㅜㅜ



스파르타 즉문즉답





작성한 코드 및 에러 메세지

select restaurant_name,

case when sum_quan =< 5 then 0.1

when sum_quan > 15 and sum_price >=300000 then 0.005

else 0.01

end ratio_discount

from

(

select restaurant_name, sum(quantity) as sum_quan, sum(price) as sum_price

from food_orders

group 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 '=< 5 then 0.1

when sum_quan > 15 and sum_price >=300000 then 0.005

else 0.' at line 2


Error position: line: 1


취소
 공유
취소
댓글 0
댓글 알림
나의얼굴