본문 바로가기
728x90
반응형

DB/SQL20

HackerRank_10. Weather Observation Station 4 문제 : SELECT COUNT(*) - COUNT(distinct CITY) FROM STATION; 13 2020. 6. 11.
HackerRank_09. Weather Observation Station 3 문제 : Query a list of CITY names from STATION with even ID numbers only. You may print the results in any order, but must exclude duplicates from your answer. select distinct CITY from STATION where MOD(ID,2) = 0; 2020. 6. 11.
HackerRank_08. Weather Observation Station 2 문제 : Query the following two values from the STATION table: The sum of all values in LAT_N rounded to a scale of decimal places. The sum of all values in LONG_W rounded to a scale of decimal places. SELECT ROUND(SUM(LAT_N), 2) AS lat, ROUND(SUM(LONG_W),2) AS lon FROM STATION; 42850.04 47381.48 2020. 6. 11.
HackerRank_07.Weather Observation Station 1 문제 : Query a list of CITY and STATE from the STATION table. select CITY, STATE from STATION; 2020. 6. 11.
HackerRank_06. Japanese Cities' Names 문제 : 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'; Neyagawa Ageo Sayama Omuta Tokuyama 2020. 6. 11.
HackerRank_05.Japanese Cities' Attributes 문제 : Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN. select * from CITY where COUNTRYCODE = 'JPN'; 1613 Neyagawa JPN Osaka 257315 1630 Ageo JPN Saitama 209442 1661 Sayama JPN Saitama 162472 1681 Omuta JPN Fukuoka 142889 1739 Tokuyama JPN Yamaguchi 107078 2020. 6. 11.
HackerRank_04. Select By ID 문제 : Query all columns for a city in CITY with the ID 1661. select * from CITY where ID = 1661; 1661 Sayama JPN Saitama 162472 2020. 6. 11.
HackerRank_03. SELECT ALL 문제 : Query all columns (attributes) for every row in the CITY table. select * from CITY 6 Rotterdam NLD Zuid-Holland 593321 3878 Scottsdale USA Arizona 202705 3965 Corona USA California 124966 3973 Concord USA California 121780 3977 Cedar Rapids USA Iowa 120758 3982 Coral Springs USA Florida 117549 4054 Fairfield USA California 92256 4058 Boulder USA Colorado 91238 4061 Fall River USA Massachuse.. 2020. 6. 11.
HackerRank_02. Revising the Select Query II 문제 : Query the names of all American cities in CITY with populations larger than 120000. The CountryCode for America is USA. select Name from CITY where COUNTRYCODE = 'USA' AND POPULATION > 120000; Scottsdale Corona Concord Cedar Rapids 2020. 6. 11.
HackerRank_01. Revising the Select Query I 문제 : Query all columns for all American cities in CITY with populations larger than 100000. The CountryCode for America is USA. select * from CITY where COUNTRYCODE = 'USA' AND POPULATION > 100000; 3878 Scottsdale USA Arizona 202705 3965 Corona USA California 124966 3973 Concord USA California 121780 3977 Cedar Rapids USA Iowa 120758 3982 Coral Springs USA Florida 117549 2020. 6. 11.
728x90
반응형