MySQL/문제풀이24 [HackerRank] Weather Observation Station 3 / Weather Observation Station 19 1) Weather Observation Station 3 1. 문제 Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. 2. 답 SELECT DISTINCT city FROM station WHERE id % 2 = 0 3. KEY POINT 짝수 표현 방법 : 1. n % 2 =.. 2021. 3. 23. [HackerRank] Top Competitors 1. 문제 Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of hackers who achieved full scores for more than one challenge. Order your output in descending order by the total number of challenges in which the hacker earned a full score. If more than one hacker received full scores in same num.. 2021. 3. 23. [HackerRank] Population Density Difference / Weather Observation Station 11 / Weather Observation Station 13 1) Population Density Difference 1. 문제 Query the difference between the maximum and minimum populations inCITY. Input Format The CITY table is described as follows: 2. 답 SELECT MAX(population) - MIN(population) FROM city 3. KEY POINT MAX(컬럼명) : 해당 컬럼에서의 최댓값 MIN(컬럼명) : 해당 컬럼에서의 최솟값 www.hackerrank.com/challenges/population-density-difference/problem?h_r=internal-search Population Density Differenc.. 2021. 3. 23. [HackerRank] 여러 개의 INNER JOIN : New Companies 1. 문제 Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy: Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of employees. Order your output by ascending company_code. Note: The tables may contai.. 2021. 3. 22. [HackerRank] Japan Population / Weather Observation Station 2 / Weather Observation Station 18 1) Japan Population 1. 문제 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: 2. 답 SELECT SUM(population) FROM city WHERE countrycode = "JPN" 3. KEY POINT SUM(컬럼명) : 해당 컬럼의 합 www.hackerrank.com/challenges/japan-population/problem?h_r=internal-search Japan Population | HackerRank Query to the sum .. 2021. 3. 22. [LeetCode] 175. Combine Two Tables 1. 문제 Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | +-------------+---------+ PersonId is the primary key column for this table. Table: Address +-------------+---------+ | Column Name | Type | +-------------+---------+ | AddressId | int | | PersonId | int | | City | varchar | | State | va.. 2021. 3. 22. 이전 1 2 3 4 다음