| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- javascript
- 백준
- SQL 고득점 KIT
- Baekjoon
- bfs
- softeer
- Lv. 2
- 티스토리챌린지
- Lv. 0
- 깊이 우선 탐색
- DP
- 자바스크립트
- 동적계획법
- 오블완
- Java
- 소프티어
- Python
- group by
- Dynamic Programming
- 너비 우선 탐색
- LEVEL 2
- Lv. 1
- SQL
- 파이썬
- join
- dfs
- 프로그래머스
- programmers
- Lv. 3
- level 3
- Today
- Total
목록SQL (74)
몸과 마음이 건전한 SW 개발자
문제 링크https://www.hackerrank.com/challenges/weather-observation-station-11/problem?isFullScreen=true Weather Observation Station 11 | HackerRankQuery a list of CITY names not starting or ending with vowels.www.hackerrank.com정답 코드select distinct city from station where city not like '[aeiou]%[aeiou]';풀이 과정city의 앞 문자가 a e i o u로 시작하지 않고 뒷 문자가 a e i o u로 끝나지 않고 라는 명제가 있다.'[^aeiou]%' and '%[^aeiou]'이..
문제 링크https://www.hackerrank.com/challenges/weather-observation-station-8/problem?isFullScreen=true Weather Observation Station 8 | HackerRankQuery CITY names that start AND end with vowels.www.hackerrank.com정답 코드select distinct city from station where city like '[aeiou]%[aeiou]';풀이 과정앞 뒤로 a e i o u가 있는 city를 찾는다.느낀점이 문제도 마찬가지로 city를 가공해서 풀 수도 있다.정규표현식을 사용해서 조금이라도 더 빠르게 성능을 향상시킬 수 있다.하지만 데이터 양이 적..
정규 표현식을 공부하고 사용할 수 있다.패턴 매칭을 통해서 성능을 향상할 수 있다. 기본적으로 알아야 할 패턴정규 표현식 설명사이트 추천LIKE VS PATINDEXREGEXP_LIKE정리하기 1. 기본적으로 알아야 할 패턴 1. 필수: 기본 패턴 (LIKE 연산자)가장 기초적이지만 실무 쿼리의 90%를 차지한다.기호의미예시설명%0개 이상의 모든 문자LIKE 'A%''A'로 시작하는 모든 문자열_정확히 1개의 모든 문자LIKE 'A_''A'로 시작하는 딱 두 글자 문자열[]대괄호 안의 문자 중 하나LIKE '[aeiou]%'모음으로 시작하는 문자열[^]대괄호 안의 문자가 아닌 것LIKE '[^0-9]%'숫자로 시작하지 않는 문자열2. 기본: 문자 범위 지정특정 범위의 문자를 찾을 때 사용하며, 인덱싱 ..
문제 링크https://www.hackerrank.com/challenges/weather-observation-station-7/problem?isFullScreen=true Weather Observation Station 7 | HackerRankQuery the list of CITY names ending with vowels (a, e, i, o, u) from STATION.www.hackerrank.com최적화 코드SELECT DISTINCT CITYFROM STATIONWHERE CITY LIKE '%[aeiou]';아쉬운 코드 (내코드)select distinct city from station where right(city, 1) in ('a', 'e', 'i', 'o', 'u');풀..
문제 링크https://www.hackerrank.com/challenges/weather-observation-station-5/problem?isFullScreen=true Weather Observation Station 5 | HackerRankWrite a query to print the shortest and longest length city name along with the length of the city names.www.hackerrank.com 정답 코드SET NOCOUNT ON;SELECT TOP 1 CITY, LEN(CITY)FROM STATIONORDER BY LEN(CITY) ASC, CITY ASC;SELECT TOP 1 CITY, LEN(CITY)FROM STATION..
문제 링크https://www.hackerrank.com/challenges/weather-observation-station-4/problem?isFullScreen=true Weather Observation Station 4 | HackerRankFind the number of duplicate CITY names in STATION.www.hackerrank.com정답 코드SET NOCOUNT ON;SELECT COUNT(CITY) - COUNT(DISTINCT CITY)FROM STATION;/*Enter your query here.Please append a semicolon ";" at the end of the query and enter your query in a single lin..
