
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
요일 부분이 (일요일 기준 0) 0,1,2,3,4,5,6으로 표시되어서 불편해서 혼자 case when함수를 이용해서 0일때는 일요일, 1일때는 월요일, 2일때는 화요일 ... 로 표시 되도록 했는데 모든 것이 일요일이라고 나와요. 무엇을 잘못한 것일까요?

작성한 코드 및 에러 메세지
select date(date) date_type,
date_format(date(date), '%Y') "년",
date_format(date(date), '%m') "월",
date_format(date(date), '%d') "일",
date_format(date(date), '%w') "요일",
case when "요일" = 0 then'일요일'
when "요일" = 1 then'월요일'
when "요일" = 2 then'화요일'
when "요일" = 3 then'수요일'
when "요일" = 4 then'목요일'
when "요일" = 5 then'금요일'
when "요일" = 6 then'토요일'
end weekend
from payments
