mySQL
-
[HackerRank]-The ReportmySQL 2023. 3. 1. 21:14
https://www.hackerrank.com/challenges/the-report/problem?isFullScreen=true The Report | HackerRank Write a query to generate a report containing three columns: Name, Grade and Mark. www.hackerrank.com SELECT IF(B.GRADE>=8, A.NAME, 'NULL'), B.GRADE, A.MARKS FROM Students A join Grades B ON A.MARKS BETWEEN B.MIN_MARK AND B.MAX_MARK ORDER BY B.GRADE DESC, A.NAME, A.MARKS 문제 조건을 하나씩 살펴보면 1. 출력은 이름, ..
-
[HackerRank] Average Population of Each ContinentmySQL 2023. 2. 28. 01:04
https://www.hackerrank.com/challenges/average-population-of-each-continent/problem?isFullScreen=true&h_r=next-challenge&h_v=zen Average Population of Each Continent | HackerRank Query the names of all continents and their respective city populations, rounded down to the nearest integer. www.hackerrank.com SELECT B.Continent, FLOOR(AVG(A.Population)) FROM CITY A JOIN COUNTRY B ON A.Countrycode = ..
-
[HackerRank] Top EarnersmySQL 2023. 2. 27. 00:56
https://www.hackerrank.com/challenges/earnings-of-employees/problem?isFullScreen=true&h_r=next-challenge&h_v=zen Top Earners | HackerRank Find the maximum amount of money earned by any employee, as well as the number of top earners (people who have earned this amount). www.hackerrank.com SELECT salary*months, count(*) from employee group by salary*months order by salary*months desc limit 1 지금껏 받..
-
[HackerRank] The BlundermySQL 2023. 2. 27. 00:49
https://www.hackerrank.com/challenges/the-blunder/problem?isFullScreen=true The Blunder | HackerRank Query the amount of error in Sam's result, rounded up to the next integer. www.hackerrank.com SELECT CEIL(AVG(SALARY)-AVG(REPLACE(SALARY,0,''))) FROM EMPLOYEES 문제를 보면 영어가 뭐라뭐라 막 쓰여져 있는데 대충 요약하면 - 직원들의 실제 월급의 평균과 실제 월급에서 '0'을 뺀 숫자(2006 -> 26, 1720 -> 172)의 평균의 차를 구하고 - 그 평균의 차가 소수일 경우 올림하여 출력할 것. ..
-
[HackerRank] Weather Observation Station 20mySQL 2023. 2. 26. 13:15
https://www.hackerrank.com/challenges/weather-observation-station-20/problem?isFullScreen=true&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Weather Observation Station 20 | HackerRank Query the median of Northern Latitudes in S..
-
[HackerRank] Weather Observation Station 19mySQL 2023. 2. 26. 13:03
https://www.hackerrank.com/challenges/weather-observation-station-19/problem?isFullScreen=true&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Weather Observation Station 19 | HackerRank Query the Euclidean Distance between two points and round to 4 decimal..
-
[HackerRank] Weather Observation Station 18mySQL 2023. 2. 26. 12:58
https://www.hackerrank.com/challenges/weather-observation-station-18/problem?isFullScreen=true&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Weather Observation Station 18 | HackerRank Query the Manhattan Distance between two points, round or truncate to 4 decimal digits. www.hacke..