[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'
[MySQL/HackerRank] Revising Aggregations - The Count Function
·
SQL/HackerRank
Query a count of the number of cities in CITY having a Population larger than 100,000.Input FormatThe CITY table is described as follows:  SELECT COUNT(*)FROM CITYWHERE POPULATION > 100000
[MySQL/HackerRank] Type of Triangle
·
SQL/HackerRank
Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in the table:Equilateral: It's a triangle with 3 sides of equal length.Isosceles: It's a triangle with 2 sides of equal length.Scalene: It's a triangle with 3 sides of differing lengths.Not A Triangle: The given values of A, B, and C don't ..
[MySQL/HackerRank] Employee Salaries
·
SQL/HackerRank
Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2,000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id. Input FormatThe Employee table containing employee data for a company is described as follows:where employee_id is an employee's ID number, name is their na..
[MySQL/HackerRank] Employee Names
·
SQL/HackerRank
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order.Input FormatThe 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.Samp..
_xxxx
'Easy' 태그의 글 목록