[MySQL/HackerRank] Weather Observation Station 7
·
SQL/HackerRank
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.Input FormatThe STATION table is described as follows:where LAT_N is the northern latitude and LONG_W is the western longitude.SELECT DISTINCT CITYFROM STATIONWHERE UPPER(RIGHT(CITY, 1)) IN ('A', 'E', 'I', 'O', 'U');
[MySQL/HackerRank] Weather Observation Station 6
·
SQL/HackerRank
Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.Input FormatThe STATION table is described as follows:where LAT_N is the northern latitude and LONG_W is the western longitude.SELECT DISTINCT CITYFROM STATIONWHERE UPPER(LEFT(CITY, 1)) IN ('A', 'E', 'I', 'O', 'U');
[MySQL/HackerRank] Weather Observation Station 5
·
SQL/HackerRank
Query the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically.The STATION table is described as follows:where LAT_N is the northern latitude and LONG_W is the western longitude.Sample InputFor exa..
[MySQL/HackerRank] Weather Observation Station 4
·
SQL/HackerRank
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.The STATION table is described as follows:where LAT_N is the northern latitude and LONG_W is the western longitude.For example, if there are three records in the table with CITY values 'New York', 'New York', 'Bengalaru', there are 2 different city names: 'New York' and ..
[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] 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
[MySQL/HackerRank] Revising the Select Query I
·
SQL/HackerRank
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 * FROM CITYWHERE POPULATION > 100000 AND COUNTRYCODE = "USA"
_xxxx
'HackerRank' 태그의 글 목록 (3 Page)