Blair  - Soul Eater [프로그래머스_SQL] 조건에 맞는 회원수 구하기

• programming language/SQL

[프로그래머스_SQL] 조건에 맞는 회원수 구하기

oujin 2024. 1. 7. 00:51
728x90

SELECT count(*) as USERS
from USER_INFO 
where year(JOINED)=2021 and age>=20 and age<=29

 

▶ 조건에 맞는 값 개수 세기 : count(*) as 별칭

 

▶ 조건식 between : 컬럼명 between 숫자 1 and 숫자 2

 

▶연도만 출력하기 : year(컬럼명) = 연도네자리

month : 월

datofmonth : 

 

728x90