Algorithm & SQL/HackerRank
[SQL][HackerRank] Revising the Select Query II
Finn_
2022. 12. 3. 17:02
반응형
😅 문제 출처
https://www.hackerrank.com/challenges/revising-the-select-query-2/problem
Revising the Select Query II | HackerRank
Query the city names for all American cities with populations larger than 120,000.
www.hackerrank.com
1️⃣ 문제
인구가 120,000명보다 큰 CITY 테이블의 모든 미국 도시에 대한 NAME 필드를 쿼리합니다.
미국의 국가 코드는 미국이다.
2️⃣ MySQL 쿼리
select name
from city
where population > 120000
and countrycode = 'USA';
Run Code 버튼 클릭 시,
Submit Code 버튼 클릭 시,
반응형