본문 바로가기

728x90

SQL

[HackerRank/MySQL] Weather Observation Station 9 모음(a, e, i, o, u)으로 시작하지 않는 CITY 이름 출력 링크: https://www.hackerrank.com/challenges/weather-observation-station-9/problem Weather Observation Station 9 | HackerRank Query an alphabetically ordered list of CITY names not starting with vowels. www.hackerrank.com SELECT DISTINCT city FROM station WHERE LEFT(city, 1) NOT IN ('a', 'e', 'i', 'o', 'u') SELECT DISTINCT city FROM statio.. 더보기
[HackerRank/MySQL] Weather Observation Station 8 양 끝이 모음(a, e, i, o, u)인 CITY 이름 출력 링크: https://www.hackerrank.com/challenges/weather-observation-station-8/problem Weather Observation Station 8 | HackerRank Query CITY names that start AND end with vowels. www.hackerrank.com SELECT DISTINCT city FROM station WHERE (LEFT(city, 1)IN('a', 'e', 'i', 'o', 'u')) AND (RIGHT(city, 1)IN('a', 'e', 'i', 'o', 'u')) .. 더보기
[HackerRank/MySQL] Weather Observation Station 7 모음(a, e, i, o, u)으로 끝나는 CITY 이름 출력 링크: https://www.hackerrank.com/challenges/weather-observation-station-7/problem Weather Observation Station 7 | HackerRank Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. www.hackerrank.com SELECT DISTINCT city FROM station WHERE SUBSTRING(city, -1, 1) IN ('a', 'e', 'i', 'o', 'u') SELECT DISTINCT city FROM stat.. 더보기
[HackerRank/MySQL] Weather Observation Station 6 모음(a, e, i, o, u)으로 시작하는 CITY 이름 출력 링크: https://www.hackerrank.com/challenges/weather-observation-station-6/problem Weather Observation Station 6 | HackerRank Query a list of CITY names beginning with vowels (a, e, i, o, u). www.hackerrank.com SELECT DISTINCT city FROM station WHERE SUBSTRING(city, 1, 1) IN ('a', 'e', 'i', 'o', 'u') SELECT DISTINCT city FROM station WHERE LE.. 더보기
[HackerRank/MySQL] Weather Observation Station 5 STATION 테이블에서 글자수가 가장 적은 CITY의 이름과 글자수, 가장 많은 CITY의 이름과 글자수 출력 (단, 글자수가 같은 값이 2개일 경우, 알파벳 순으로 가장 첫번째 출력) 링크: https://www.hackerrank.com/challenges/weather-observation-station-5/problem Weather Observation Station 5 | HackerRank Write a query to print the shortest and longest length city name along with the length of the city names. www.hackerrank.com (SELECT city, LENGTH(cit.. 더보기
[HackerRank/MySQL] Weather Observation Station 4 전체 city 항목수와 중복을 제거한 city 항목수의 차 구하기 링크: https://www.hackerrank.com/challenges/weather-observation-station-4/problem Weather Observation Station 4 | HackerRank Find the number of duplicate CITY names in STATION. www.hackerrank.com SELECT COUNT(city) - COUNT(DISTINCT city) FROM station SELECT 문 (조건검색) SELECT: 키워드와 함께 검색하고 싶은 속성의 이름을 나열 COUNT: 속성 값의 개수를 검색.. 더보기
[HackerRank/MySQL] Weather Observation Station 3 STATION 테이블에서 중복없이 ID가 짝수인 CITY 속성 가져오기 링크: https://www.hackerrank.com/challenges/weather-observation-station-3/problem Weather Observation Station 3 | HackerRank Query a list of unique CITY names with even ID numbers. www.hackerrank.com SELECT DISTINCT city FROM station WHERE mod(id, 2)=0 SELECT DISTINCT city FROM station WHERE id%2 = 0 SELECT 문 (조건검색) .. 더보기
[HackerRank/MySQL] Weather Observation Station 1 STATION 테이블에서 CITY, STATE 칼럼 가져오기 링크: https://www.hackerrank.com/challenges/weather-observation-station-1/problem Weather Observation Station 1 | HackerRank Write a query to print the CITY and STATE for each attribute in the STATION table. www.hackerrank.com SELECT city, state FROM station SELECT 문 (조건검색) SELECT: 키워드와 함께 검색하고 싶은 속성의 이름을 나열 FROM: 키워드와 함께 .. 더보기

728x90