12/27 - SQL 심화학습 2일차
[기억할 개념] 값이 잘못되어 있을 때: case when 가장 적은 값일 경우, then ~ when 가장 큰 값일 경우, then ~ 데이터 갯수 : COUNT(컬럼) * 컬럼명 대신 1 혹은 * 사용 가능 몇개의 값을 가지고 있는지 구할 때 : DISTINCT 날짜 함수: date-format(date(date), '%n'), "0" a. 년 : Y (4자리), y(2자리) b. 월 : M, m c. 일 : d, e d. 요일 : w select date(date) date_type, date_format(date(date), '%Y') "년", date_format(date(date), '%m') "월", date_format(date(date), '%d') "일", date_format(date..
2023. 12. 27.