일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 패스트캠퍼스후기
- row_number
- LeetCode
- 해커랭크
- MySQL
- 파이썬을활용한시계열데이터분석AtoZ올인원패키지Online
- Hard
- easy
- RANK
- 패스트캠퍼스
- 시계열데이터분석
- 패캠챌린지
- medium
- 프리미엄
- recursive
- meidum
- 다시풀어보기
- 파이썬을활용한시계열데이터분석
- solvesql
- SQL
- SELF-JOIN
- 직장인인강
- join
- lv.4
- group by
- 직장인자기계발
- HACKER_RANK
- Hackerrank
- 어려웠음
- 프로그래머스
- Today
- Total
목록SQL (271)
~고군분투 인생살이~
Weather Observation Station 7 | HackerRank Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. www.hackerrank.com 문제 조건 끝 글자가 a,e,i,o,u를 가지는 city 이름을 유니크하게 출력하시오 문제 풀이 # solution 1 select distinct city from station where city regexp '[a,e,i,o,u]$' # solution 2 select distinct city from station where city like '%a' or city like '%e' or city like '%i' or city like '%o' or..
Weather Observation Station 6 | HackerRank Query a list of CITY names beginning with vowels (a, e, i, o, u). www.hackerrank.com 문제 조건 a,e,i,o,u로 시작되는 city의 이름을 출력하시오 문제 풀이 # solution 1 select city from station where left(city,1) in ('a','e','i','o','u') # solution 2 select city from station where substr(city,1,1) in ('a','e','i','o','u')
Weather Observation Station 20 | HackerRank Query the median of Northern Latitudes in STATION and round to 4 decimal places. www.hackerrank.com 문제 조건 북부 위도(LAT_N)의 중앙값을 출력하시오 문제 풀이 WITH TEMP AS( SELECT LAT_N, PERCENT_RANK() OVER(ORDER BY LAT_N) AS PERCENT FROM STATION) SELECT ROUND(LAT_N,4) FROM TEMP WHERE PERCENT = 0.5
Weather Observation Station 19 | HackerRank Query the Euclidean Distance between two points and round to 4 decimal digits. www.hackerrank.com 문제 조건 두 점 사이의 거리를 유클리드 거리 공식을 활용하여 출력하시오. 문제 풀이 SELECT ROUND( SQRT( POWER((MAX(LAT_N) - MIN(LAT_N)),2) + POWER((MAX(LONG_W)-MIN(LONG_W)),2) ),4 ) FROM STATION
Weather Observation Station 4 | HackerRank Find the number of duplicate CITY names in STATION. www.hackerrank.com 문제 조건 전체 city 수와 고유한 city 수의 차이를 구하시오 문제 풀이 SELECT (COUNT(CITY) - COUNT(DISTINCT CITY)) FROM STATION
Weather Observation Station 3 | HackerRank Query a list of unique CITY names with even ID numbers. www.hackerrank.com 문제 조건 Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer. 문제 풀이 SELECT DISTINCT city FROM STATION WHERE (ID % 2 ) = 0
Weather Observation Station 1 | HackerRank Write a query to print the CITY and STATE for each attribute in the STATION table. www.hackerrank.com 문제 조건 station 테이블에서 city와 state를 출력하시오. 문제 풀이 select city, state from station

Weather Observation Station 18 | HackerRank Query the Manhattan Distance between two points, round or truncate to 4 decimal digits. www.hackerrank.com 문제 조건 Consider P1(a,b) and P2(c,d) to be two points on a 2D plane. happens to equal the minimum value in Northern Latitude (LAT_N in STATION). happens to equal the minimum value in Western Longitude (LONG_W in STATION). happens to equal the maximu..