Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Archives
Today
Total
관리 메뉴

forest_moon

[hackerrank, SQL]Weather Observation Station 7 본문

알고리즘

[hackerrank, SQL]Weather Observation Station 7

rokga 2023. 2. 13. 21:49

문제 풀러 가기

 

 

문제 풀이에 대해 생각한 부분

1. 중복을 포함할 수 없음 (DISTINCT)

2. 정규표현식

3. LIKE

 

SELECT 
	DISTINCT city
FROM 
	station
WHERE 
	city REGEXP '[aeiou]$'
    ;

 

 

SELECT 
	DISTINCT city
FROM 
	station
WHERE 
	city LIKE ('%a') OR 
    CITY LIKE ('%e') OR 
    CITY LIKE ('%i') OR 
    CITY LIKE ('%o') OR 
    CITY LIKE ('%u')
    ;

 

'알고리즘' 카테고리의 다른 글

[hackerrank, SQL]Weather Observation Station 9  (0) 2023.02.13
[hackerrank, SQL]Weather Observation Station 8  (0) 2023.02.13
배열자르기  (0) 2023.02.09
양꼬치  (0) 2023.02.09
특정 문자 제거하기  (0) 2023.02.09