◦ Algorithm/SQL
프로그래머스 3월에 태어난 여성 회원 목록 출력하기 MYSQL
밍블리s2
2023. 4. 20. 18:43
https://school.programmers.co.kr/learn/courses/30/lessons/131120?language=mysql
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
- date에서 월만 추출할 때 : month(date_of_birth)
- date format : date_format(date_of_birth, '%Y-%m-%d')
- 대문자Y : 1990 처럼 네 자리 출력, 소문자y : 90 처럼 두 자리 출력
SELECT member_id,
member_name,
gender,
date_format(date_of_birth, '%Y-%m-%d') as date_of_birth
from member_profile
where tlno is not null
and month(date_of_birth) = 3
and gender = 'w'