SQL/HackerRank

문제 Samantha was tasked with calculating the average monthly salaries for all employees in the EMPLOYEES table, but did not realize her keyboard's key was broken until after completing the calculation. She wants your help finding the difference between her miscalculation (using salaries with any zeros removed), and the actual average salary. Write a query calculating the amount of error (i.e.: ac..
문제 Query the difference between the maximum and minimum populations in CITY. Input Format The CITY table is described as follows: https://www.hackerrank.com/challenges/population-density-difference/problem?isFullScreen=true Population Density Difference | HackerRank Query the difference between the maximum and minimum city populations in CITY. www.hackerrank.com 문제 풀이 SELECT MAX(population) - MI..
문제 Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. Input Format The CITY table is described as follows: https://www.hackerrank.com/challenges/japan-population/problem?isFullScreen=true Japan Population | HackerRank Query to the sum of the populations of all Japanese cities in CITY. www.hackerrank.com 문제 풀이 SELECT SUM(population) FROM city WHERE..
문제 Query the average population for all cities in CITY, rounded down to the nearest integer. Input Format The CITY table is described as follows: https://www.hackerrank.com/challenges/average-population/problem?isFullScreen=true Average Population | HackerRank Query the average population of all cities, rounded down to the nearest integer. www.hackerrank.com 문제 풀이 SELECT FLOOR(AVG(population)) F..
문제 Query the average population of all cities in CITY where District is California. Input Format The CITY table is described as follows: https://www.hackerrank.com/challenges/revising-aggregations-the-average-function/problem?isFullScreen=true Revising Aggregations - Averages | HackerRank Query the average population of all cities in the District of California. www.hackerrank.com 문제 풀이 SELECT AV..
문제 Query the total population of all cities in CITY where District is California. Input Format The CITY table is described as follows: https://www.hackerrank.com/challenges/revising-aggregations-sum/problem?isFullScreen=true Revising Aggregations - The Sum Function | HackerRank Query the total population of all cities for in the District of California. www.hackerrank.com 문제 풀이 SELECT SUM(populat..
문제 Query a count of the number of cities in CITY having a Population larger than 100,000. Input Format The CITY table is described as follows: https://www.hackerrank.com/challenges/revising-aggregations-the-count-function/problem?isFullScreen=true Revising Aggregations - The Count Function | HackerRank Query the number of cities having populations larger than 100000. www.hackerrank.com 문제 풀이 SEL..
문제 Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. 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. https://www.hackerrank.com/challenges/weather-observation-station-11/problem?isFullScreen=true Weather Observation Stati..
문제 Query the list of CITY names from STATION that do not end with vowels. 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. https://www.hackerrank.com/challenges/weather-observation-station-10/problem?isFullScreen=true Weather Observation Station 10 | HackerRank Query a list of ..
문제 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. https://www.h..
zinni
'SQL/HackerRank' 카테고리의 글 목록 (2 Page)