일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 알고리즘
- 최강의 인생
- node.js
- 재귀함수
- Developer_JoyKim
- Hackerrank
- 블록체인
- MySQL
- Algorithms
- 역행자
- array.push()
- array.slice()
- join
- 프로그래머스
- array
- 코플릿
- for문
- 정규표현식
- 배열
- select
- 개발자의 책장
- JavaScript
- 코드스테이츠
- 코딩테스트
- 코딩공부
- Programmers
- Where
- 자바스크립트
- 개발자_조이킴
- SQL
Archives
- Today
- Total
CodingSpace
[HackerRank/SQL] Basic Select - Weather Observation Station 12 본문
HackerRank/SQL
[HackerRank/SQL] Basic Select - Weather Observation Station 12
개발자_조이킴 2022. 7. 20. 09:14Problem. Basic Select - Weather Observation Station 12
Link.
https://www.hackerrank.com/challenges/weather-observation-station-12/problem?isFullScreen=true
Description.
Query the list of CITY names from STATION that do not start with vowels and do not end with vowels.
Your result cannot contain duplicates.
Key Point.
REGXP, 정규표현식(Regular Expression)을 사용하면 복잡한 문자열 조건을 걸어 데이터를 검색할 수 있다.
My Answer.
SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP '^[^aeiou].*[^aeiou]$';
References.
MySQL 정규표현식: https://velog.io/@gillog/MySQL-REGEXPRegular-Expression%EC%A0%95%EA%B7%9C-%ED%91%9C%ED%98%84%EC%8B%9D
'HackerRank > SQL' 카테고리의 다른 글
[HackerRank/SQL] Advanced Select - Binary Tree Nodes (0) | 2022.07.24 |
---|---|
[HackerRank/SQL] Alternative Queries - Draw The Triangle 2 (0) | 2022.07.22 |
[HackerRank/SQL] Aggregation - Japan Population (0) | 2022.07.19 |
[HackerRank/SQL] Revising Aggregations - Top Earners (0) | 2022.07.19 |
[HackerRank/SQL] Revising Aggregations - The Blunder (0) | 2022.07.17 |
Comments