본문 바로가기

SQL 공부

HackerRank로 SQL 공부하기 advanced select - The PADS

728x90

select concat(name, '(',left(occupation,1),')')
from OCCUPATIONS
order by name;

select concat('There are a total of ', count(occupation),' ',lower(occupation),'s.')
from OCCUPATIONS
group by occupation
order by count(occupation), occupation;

 

 

 

문자열을 합치는 함수: concat()

대문자 변환: upper()

소문자 변환: lower()