Home [Programmers] 조건에 맞는 도서 리스트 출력하기
Post
Cancel

[Programmers] 조건에 맞는 도서 리스트 출력하기

[Programmers] 조건에 맞는 도서 리스트 출력하기

출처

문제

image1

image2

풀이

  • date_format() : 날짜 형식 변경하기
  • %Y : 년도 4자리 표시
  • %m : 월, 숫자로 표시, 2자리
  • %d : 일, 2자리 표시
  • year() : 년도 표시
    1
    2
    3
    4
    5
    
    -- 코드를 입력하세요
    SELECT book_id, date_format(published_Date, "%Y-%m-%d") as published_date
    from book
    where year(published_date) = 2021 and (category = "인문")
    order by published_Date
    

gh-pages

This post is licensed under CC BY 4.0 by the author.

[solvesql] 점검이 필요한 자전거 찾기

[Programmers] 조건에 부합하는 중고거래 상태 조회하기