Question
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:
My Answer
SELECT NAME
FROM CITY
WHERE POPULATION > 120000
AND COUNTRYCODE = 'USA';
Result
출처 : https://www.hackerrank.com/challenges/revising-the-select-query-2/problem
Revising the Select Query II | HackerRank
Query the city names for all American cities with populations larger than 120,000.
www.hackerrank.com
'SQL > HackerRank' 카테고리의 다른 글
[MySQL/HackerRank] Japanese Cities' Names (0) | 2022.07.24 |
---|---|
[MySQL/HackerRank] Japanese Cities' Attributes (0) | 2022.07.24 |
[MySQL/HackerRank] Select By ID (0) | 2022.07.11 |
[MySQL/HackerRank] Select All (0) | 2022.07.10 |
[MySQL/HackerRank] Revising the Select Query I (0) | 2022.07.07 |