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;
반응형
'SQL > HackerRank' 카테고리의 다른 글
댓글
이 글 공유하기
다른 글
-
HackerRank- Weather Observation Station 10,11,12,Higher Than 75 Marks,Employee Names
HackerRank- Weather Observation Station 10,11,12,Higher Than 75 Marks,Employee Names
2022.09.12 -
HackerRank- Weather Observation Station 6,7,8,9
HackerRank- Weather Observation Station 6,7,8,9
2022.09.04 -
HackerRank-Japanese Cities' Attributes, Japanese Cities' Names, Weather Observation Station 1, Weather Observation Station 3, Weather Observation Station 4 (COUNT(*))
HackerRank-Japanese Cities' Attributes, Japanese Cities' Names, Weather Observation Station 1, Weather Observation Station 3, Weather Observation Station 4 (COUNT(*))
2022.08.28 -
HackerRank SQL 정리표 🗓
HackerRank SQL 정리표 🗓
2022.08.23