문제풀이/HackerRank

Revising the Select Query I

제밍 2022. 11. 2. 10:39

복습도 해볼겸 

다시 풀어보기--!

 

우선 문제는 

 

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:

요론식으로 되어이따!

*조건 

1. CITY TABLE에서의 모든 컬럼을 가져올것

2. 인구가 100000명보다 많을 것

3. COUNTRYCODE 가 USA 일것!

 

그러므로 답은

 

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

 

여기선 USA는 문자니까 따옴표 붙여야하는고 잊지말기 ~.~ 

LIKE 와 = 방심하지말것 !

 

 

Revising the Select Query I | HackerRank