hackerrank(26)
-
[HackerRank] Weather Observation Station 7
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. SELECT DISTINCT city FROM station WHERE city REGEXP '[aeiou]$';
2021.01.22 -
[HackerRank] Japan Population
Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. Input Format SELECT SUM(POPULATION) FROM CITY WHERE COUNTRYCODE = 'JPN';
2021.01.21 -
[HackerRank] Employee Names
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order. Input Format The Employee table containing employee data for a company is described as follows: where employee_id is an employee's ID number, name is their name, months is the total number of months they've been working for the company, and salary is their monthly salary. ..
2021.01.21 -
[HackerRank] Weather Observation Station 6
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 Format The STATION table is described as follows: SELECT CITY FROM STATION WHERE regexp_like (CITY, '^a|^e|^i|^o|^u');
2021.01.21 -
[HackerRank] Weather Observation Station 5
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 Input For..
2021.01.20 -
[HackerRank] Weather Observation Station 4
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: SELECT COUNT(CITY) - COUNT(DISTINCT CITY) FROM STATION
2021.01.20