Algorithm/SQL Query test

[MySQL] HackerRank - Revising the select Query II

감자 🥔 2021. 7. 20. 02:27
반응형

문제링크

https://www.hackerrank.com/challenges/revising-the-select-query-2/problem

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 describe as follows:

 

정답
SELECT NAME
FROM CITY
WHERE POPULATION > 120000
AND COUNTRYCODE LIKE 'USA'

결과 화면

 

반응형