문제 URL : https://solvesql.com/problems/olympic-cities/
https://solvesql.com/problems/olympic-cities/
solvesql.com
* 문제 저작권으로 인하여 직접 작성한 쿼리문만 첨부
select year, upper(substring(city,0,4)) as city
from games
where year > 1999
order by year desc
substring(자를 문자열, startIdx, endIdx) - startIdx부터 endIdx 직전까지(포함X) 문자열을 잘라 반환
upper(문자열) - 문자열 내 문자를 모두 대문자로 변환하여 반환
'Problem Solving' 카테고리의 다른 글
[SolveSQL] 쇼핑몰의 일일 매출액 (0) | 2025.02.04 |
---|---|
[SolveSQL] 우리 플랫폼에 정착한 판매자 1 (0) | 2025.02.03 |
[SolveSQL] 3년간 들어온 소장품 집계하기 (0) | 2025.02.03 |
[SolveSQL] 최대값을 가진 행 찾기 (0) | 2025.02.03 |
[백준] 2655-가장 높은 탑 쌓기 (1) | 2024.09.28 |