반응형
HakerRank링크
https://www.hackerrank.com/challenges/revising-the-select-query/problem?isFullScreen=true
Revising the Select Query I | HackerRank
Query the data for all American cities with populations larger than 100,000.
www.hackerrank.com
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 *을 하여 모든 칼럼을 표기
- CITY 테이블로부터
- USA라는 나라의 코드
- 인구수 10만 이상인 도시만을 표기한다.
코드
SELECT *
FROM CITY
WHERE COUNTRYCODE = 'USA'
AND POPULATION > 100000
처음으로 SQL 공부하고 코테를 풀어봤는데 뭔가 신기하면서도 재밌는거 같다..
c++와는 또 다른 매력이랄까?? ㅋㅋㅋ
반응형
'HackerRank' 카테고리의 다른 글
HackerRank : Dijkstra: Shortest Reach 2 (c++) (2) | 2023.10.19 |
---|---|
HackerRank : Apple and Orange (c++) (0) | 2023.10.19 |
댓글