🤖 코딩테스트 준비/해커랭크

[SQL] 해커랭크(HackerRank) - Easy1

seoyeun 2022. 9. 4. 12:12

1. Revising the Select Query 1

Query all columns for all American cities in the CITY table with populations larger than 100000.
The CountryCode for America is USA.
The CITY table is described as follows:

SELECT *
FROM CITY
WHERE POPULATION > 100000
AND COUNTRYCODE = 'USA'

https://www.hackerrank.com/challenges/revising-the-select-query/problem?isFullScreen=true 

 

Revising the Select Query I | HackerRank

Query the data for all American cities with populations larger than 100,000.

www.hackerrank.com

 

2. Revising the Select Query 2

Query the NAME field for all American cities in the CITY table with populations larger than 120000.
The CountryCode for America is USA.
SELECT NAME
FROM CITY
WHERE POPULATION > 120000
AND COUNTRYCODE = 'USA'

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

 

3. Select By ID

Query all columns for a city in CITY with the ID 1661.
SELECT *
FROM CITY
WHERE ID = '1661'

https://www.hackerrank.com/challenges/select-by-id/problem?isFullScreen=true 

 

Select By ID | HackerRank

Query the details of the city with ID 1661.

www.hackerrank.com