Studying data
[HackerRank] Basic Select > Weather Observation Station 6, 7 본문
Weather Observation Station 6
Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
[MySQL Solution]
SELECT DISTINCT CITY
FROM STATION
WHERE CITY RLIKE '^[aeiouAEIOU]'
문제 링크:
https://www.hackerrank.com/challenges/weather-observation-station-6/problem?isFullScreen=true
Weather Observation Station 7
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.
[MySQL Solution]
SELECT DISTINCT CITY
FROM STATION
WHERE CITY RLIKE '[aeiouAEIOU]$'
문제 링크:
https://www.hackerrank.com/challenges/weather-observation-station-7/problem?isFullScreen=true
'SQL' 카테고리의 다른 글
[HackerRank] Advanced Select > Binary Tree Nodes (0) | 2022.12.28 |
---|---|
[HackerRank] Advanced Select > Occupations (0) | 2022.12.28 |
[HackerRank] Basic Select > Weather Observation Station 11 (0) | 2022.12.27 |
[SQL][DDL] CREATE (0) | 2022.03.14 |
[SQL] 데이터의 종류 (0) | 2022.03.14 |
Comments