HackerRank - Revising the Select Query I, Revising the Select Query II, Select All, Select By ID
반응형
Revising the Select Query I🗒️
-> CITY 테이블, 조건: ( populations >100000 & CountryCode for America is USA )
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';
Revising the Select Query II🗒️
-> CITY 테이블, 조건: ( populations >120000 & CountryCode for America is USA )
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:
SELECT NAME FROM CITY WHERE POPULATION>120000 AND COUNTRYCODE='USA';
Select All🗒️
-> CITY 테이블
Query all columns (attributes) for every row in the CITY table.
The CITY table is described as follows:
SELECT * FROM CITY;
Select By ID🗒️
-> CITY 테이블, 조건: ( ID = 1661 )
Query all columns for a city in CITY with the ID 1661.
The CITY table is described as follows:
SELECT * FROM CITY WHERE ID=1661;
반응형