1. https://www.hackerrank.com/challenges/revising-the-select-query-2/problem?isFullScreen=true
Revising the Select Query II | HackerRank
Query the city names for all American cities with populations larger than 120,000.
www.hackerrank.com
Q: Query the NAME field for all American cities in the CITY table with populations larger than 120000. The CountryCode for America is USA.
The CITY table is described as follows:

A:
SELECT name
FROM city
WHERE population > 120000 AND CountryCode = 'USA'
2. https://www.hackerrank.com/challenges/japanese-cities-attributes/problem?isFullScreen=true
Japanese Cities' Attributes | HackerRank
Query the attributes of all the cities in Japan.
www.hackerrank.com
Q: Query all attributes of every Japanese city in the CITY table.
The COUNTRYCODE for Japan is JPN.
The CITY table is described as follows:

A:
SELECT *
FROM city
WHERE countrycode = 'JPN'
3. https://www.hackerrank.com/challenges/japanese-cities-name/problem?isFullScreen=true
Japanese Cities' Names | HackerRank
In this challenge, you will query a list of all the Japanese cities' names.
www.hackerrank.com
Q: Query the names of all the Japanese cities in the CITY table.
The COUNTRYCODE for Japan is JPN.
The CITY table is described as follows:

A:
SELECT name
FROM city
WHERE countrycode = 'JPN'
4. https://www.hackerrank.com/challenges/weather-observation-station-11/problem
Weather Observation Station 11 | HackerRank
Query a list of CITY names not starting or ending with vowels.
www.hackerrank.com
Q: 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:

A:
SELECT DISTINCT city
FROM station
WHERE (city NOT LIKE 'a%'
AND city NOT LIKE 'e%'
AND city NOT LIKE 'i%'
AND city NOT LIKE 'o%'
AND city NOT LIKE 'u%')
OR (city NOT LIKE '%a'
AND city NOT LIKE '%e'
AND city NOT LIKE '%i'
AND city NOT LIKE '%o'
AND city NOT LIKE '%u')
- 어려워서 해설 참조함..ㅜ
'SQL > 프로그래머스·HackerRank·Leetcode' 카테고리의 다른 글
| 프로그래머스 SQL - 조건에 부합하는 중고거래 상태 조회하기(Lv.2) (1) | 2024.10.11 |
|---|---|
| 프로그래머스 SQL - 상품 별 오프라인 매출 구하기(Lv.2) (0) | 2024.10.11 |
| 프로그래머스 SQL - 평균 일일 대여 요금 구하기/재구매가 일어난 상품과 회원 리스트 구하기 (3) | 2024.10.09 |
| 프로그래머스 SQL - 특정 형질을 가지는 대장균 찾기(비트 연산자 &) (0) | 2024.10.09 |
| HackerRank 해커랭크 SQL(Basic) 뽀개기 (1) + LENGTH() (0) | 2024.03.23 |