반응형 hackerrank28 [MySQL] Revising Aggregations - The Sum Function SQL > Basic Select > Revising Aggregations - The Sum Function Problem Query the total population of all cities in CITY where District is California. Input Format The CITY table is described as follows: My Answer SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = 'California' 2021. 4. 20. [MySQL] Revising Aggregations - The Count Function ▶ SQL > Aggregation > Revising Aggregations - The Count Function Problem 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: My Answer SELECT COUNT(*) FROM CITY WHERE POPULATION > 100000 2021. 4. 20. [MySQL] Employee Salaries ▶ SQL > Basic Select > Employee Salaries Problem Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id. →10개월 미만 직업으로 월급이 2000달러 이상인 직원. employee_id로 asc 정렬 Input Format The Employee table containing employee dat.. 2021. 4. 15. [MySQL] Employee Names ▶ SQL > Basic Select > Employee Names Problem 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.. 2021. 4. 15. [MySQL] Higher Than 75 Marks ▶ SQL > Basic Select > Higher Than 75 Marks Problem Query the Name of any student in STUDENTS who scored higher than Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID. → Marks가 75 보다 높은 학생들을 쿼리. 이름의 마지막 3글자로 정렬하고 중복된다면 ID로 정렬 Input For.. 2021. 4. 13. [MySQL] Weather Observation Station 12 ▶ SQL > Basic Select > Weather Observation Station 12 Problem 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. The STATION table is described as follows: → 모음으로 시작하지 않고 모음으로 끝나지 않는 CITY names, 중복X My Answer SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[^aeiou]' AND CITY REGEXP '[^aeiou]$' * R.. 2021. 4. 7. 이전 1 2 3 4 5 다음 반응형