본문 바로가기

문제풀이/HackerRank19

Weather Observation Station 11 Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. 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. *조건 모음으로 시작하거나 끝나는 단어들 없애버리기 -- 모음으로 시작할때 문자형은 대문자로 끝날때는 소문자로 하기,,, 당연한곤뎈ㅋㅋ 생각을 못해서 엉뚱하게 헤맸음 ㅜ SELECT distinct CITY FROM ST.. 2022. 11. 3.
Weather Observation Station 10 Query the list of CITY names from STATION that do not end with vowels. 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. *조건 : 모음으로 끝나지말고 중복도 없어야함 ! SELECT DISTINCT CITY FROM STATION WHERE NOT REGEXP_LIKE(CiTY,'[aeiou]$') ; Weather Observation Station 10 | HackerRank Weather Obs.. 2022. 11. 3.
Weather Observation Station 9 Query the list of CITY names from STATION that do not start with vowels. 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. *조건 : CITY를 가져와라 단, 중복은 안되고 AEIOU로 시작해서도 안된다. select distinct city from station where substr(city,1,1) not in ('A','E','I','O','U') ; MYSQL은 WHERE CITY REGE.. 2022. 11. 2.
Weather Observation Station 8 앞에 있던 문제 6과 문제7을 합치면 됨 Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. 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. SELECT DISTINCT CITY FROM STATION WHERE REGEXP_LIKE(CITY,'^A|^E|^I|^O|^U') AND .. 2022. 11. 2.