Lim Seunghyun Space

[HackerRank] Revising the Select Query II 본문

SQL/SQL 문제

[HackerRank] Revising the Select Query II

Lim Seung Hyun 2021. 11. 19. 09:59

문제 : 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

 

 

문제 해설

  • CITY 테이블에서 populations이 120,000보다 크고 CountryCode가 USA인 데이터 SELECT
  • OUTPUT 조건은 NAME 만 출력

 

풀이 (MySQL)

SELECT NAME
FROM CITY
WHERE POPULATION > 120000 AND COUNTRYCODE = "USA";
728x90

'SQL > SQL 문제' 카테고리의 다른 글

[HackerRank] Japanese Cities' Names  (0) 2021.11.19
[HackerRank] Japanese Cities' Attributes  (0) 2021.11.19
[HackerRank] Select By ID  (0) 2021.11.19
[HackerRank] Select All  (0) 2021.11.19
[HackerRank] Revising the Select Query I  (0) 2021.11.19