본문 바로가기

Algorithm/MySQL

[해커랭크(HackerRank)] Revising the Select Query I(MySQL)

문제

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'

 

풀이

  1. CITY 테이블의 모든 컬럼 조회
  2. population이 100000명보다 커야함
반응형