[해커랭크] Basic 6문제

june·2023년 3월 9일
0

SQL

목록 보기
1/31

MySQL

Revising the Select Query I

https://www.hackerrank.com/challenges/revising-the-select-query/problem?isFullScreen=true

  • Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.
SELECT *
FROM city
WHERE population > 100000
AND countrycode = 'USA'

Revising the Select Query II

https://www.hackerrank.com/challenges/revising-the-select-query-2/problem?isFullScreen=true

  • Query the NAME field for all American cities in the CITY table with populations larger than 120000. The CountryCode for America is USA.
SELECT name
FROM city
WHERE population > 120000
AND countrycode = 'USA'

Select All

https://www.hackerrank.com/challenges/select-all-sql/problem?isFullScreen=true

  • Query all columns (attributes) for every row in the CITY table.
SELECT *
FROM city

Select By ID

https://www.hackerrank.com/challenges/select-by-id/problem?isFullScreen=true

  • Query all columns for a city in CITY with the ID 1661.
SELECT *
FROM city
WHERE id = 1661

Japanese Cities' Attributes

https://www.hackerrank.com/challenges/japanese-cities-attributes/problem?isFullScreen=true

  • Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.
SELECT *
FROM city
WHERE countrycode = 'JPN'

Japanese Cities' Names

https://www.hackerrank.com/challenges/japanese-cities-name/problem?isFullScreen=true

  • Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN.
SELECT name
FROM city
WHERE countrycode = 'JPN'

Lesson & Learned

easy!

profile
나의 계절은

0개의 댓글