[MySQL/HackerRank] The Blunder (+ Ceil, Convert, Cast 함수)
·
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 0 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.:  ave..
[MySQL/HackerRank] Population Density Difference
·
SQL/HackerRank
Query the difference between the maximum and minimum populations in CITY.Input FormatThe CITY table is described as follows: SELECT MAX(POPULATION) - MIN(POPULATION)FROM CITY
[MySQL/HackerRank] Japan Population
·
SQL/HackerRank
Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN.Input FormatThe CITY table is described as follows: SELECT SUM(POPULATION)FROM CITYWHERE COUNTRYCODE='JPN'
[MySQL/HackerRank] Average Population
·
SQL/HackerRank
Query the average population for all cities in CITY, rounded down to the nearest integer.Input FormatThe CITY table is described as follows: SELECT ROUND(AVG(POPULATION), 0)FROM CITY
[MySQL/HackerRank] Revising Aggregations - Averages
·
SQL/HackerRank
Query the average population of all cities in CITY where District is California.Input FormatThe CITY table is described as follows:  SELECT AVG(POPULATION)FROM CITYWHERE DISTRICT = 'California'
[MySQL/HackerRank] Revising Aggregations - The Sum Function
·
SQL/HackerRank
Query the total population of all cities in CITY where District is California.Input FormatThe CITY table is described as follows:  SELECT SUM(POPULATION)FROM CITYWHERE DISTRICT = 'California'
_xxxx
ฅ^._.^ฅ