[MySQL/HackerRank] Weather Observation Station 3
·
SQL/HackerRank
Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.The STATION table is described as follows:* even : 짝수 (2로 나누었을 때 나머지가 0인 수)* odd : 홀수 (2로 나누었을 때 나머지가 1인 수)where LAT_N is the northern latitude and LONG_W is the western longitude.SELECT DISTINCT CITYFROM STATIONWHERE MOD(ID, 2) = 0; 나머지 함..
[MySQL/HackerRank] Weather Observation Station 1
·
SQL/HackerRank
Query a list of CITY and STATE from the STATION table.The STATION table is described as follows:where LAT_N is the northern latitude and LONG_W is the western longitude.SELECT CITY, STATEFROM STATIONWHERE LAT_N > 0 AND LONG_W >0
[MySQL/HackerRank] Japanese Cities' Names
·
SQL/HackerRank
Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.The CITY table is described as follows:SELECT * FROM CITYWHERE COUNTRYCODE = "JPN"
[MySQL/HackerRank] Select By ID
·
SQL/HackerRank
Query all columns for a city in CITY with the ID 1661.The CITY table is described as follows:SELECT *FROM CITYWHERE ID = 1661
[MySQL/HackerRank] Select All
·
SQL/HackerRank
Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN.The CITY table is described as follows:SELECT *FROM CITY
[MySQL/HackerRank] Revising the Select Query II
·
SQL/HackerRank
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 described as follows:SELECT NAMEFROM CITYWHERE COUNTRYCODE = "USA" AND POPULATION > 120000
_xxxx
ฅ^._.^ฅ