HackerRank (8) 썸네일형 리스트형 [StrataScratch] Salaries Differences [MySQL] https://platform.stratascratch.com/coding/10308-salaries-differences?code_type=3 StrataScratch platform.stratascratch.com SELECT ABS(MAX(db_employee.salary) - ( SELECT MAX(db_employee.salary) FROM db_employee GROUP BY department_id HAVING department_id = 4 )) FROM db_employee GROUP BY department_id HAVING department_id = 1 cs [StrataScratch] Workers With The Highest Salaries - 최대 값 찾기 [MySQL] https://platform.stratascratch.com/coding/10353-workers-with-the-highest-salaries?code_type=3 StrataScratch platform.stratascratch.com 코드 SELECT worker_title FROM worker JOIN title ON worker_id = worker_ref_id WHERE salary = ( SELECT max(salary) FROM worker ); cs 풀이 1. 서브 쿼리를 만들어 줍니다. 2. 서브 쿼리의 값과 같을 때를 WHERE로 구분합니다. [HackerRank Easy] Weather Observation Station 5[MySQL] https://www.hackerrank.com/challenges/weather-observation-station-5/problem?isFullScreen=true Weather Observation Station 5 | HackerRank Write a query to print the shortest and longest length city name along with the length of the city names. www.hackerrank.com Answer: SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY), CITY LIMIT 1; SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENG.. [HackerRank Medium] Symmetric Pairs [MySQL] https://www.hackerrank.com/challenges/symmetric-pairs/forum Discussion on Symmetric Pairs Challenge Write a query to output all symmetric pairs in ascending order by the value of X. www.hackerrank.com You are given a table, Functions, containing two columns: X and Y. Two pairs (X1, Y1) and (X2, Y2) are said to be symmetric pairs if X1 = Y2 and X2 = Y1. Write a query to output all such symmetric .. [MySQL] The Report [HackerRank Medium] 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 You are given two tables: Students and Grades. Students contains three columns ID, Name and Marks. Grades contains the following data: Ketty gives Eve a task to generate a report containing three c.. [MySQL] Binary Tree Nodes [HackerRank Medium] https://www.hackerrank.com/challenges/binary-search-tree-1/problem?isFullScreen=true Binary Tree Nodes | HackerRank Write a query to find the node type of BST ordered by the value of the node. www.hackerrank.com Question: You are given a table, BST, containing two columns: N and P, where N represents the value of a node in Binary Tree, and P is the parent of N. Write a query to find the node typ.. [해커랭크 HackerRank] Population Census [MySQL] https://www.hackerrank.com/challenges/asian-population/problem?isFullScreen=true Population Census | HackerRank Query the sum of the populations of all cities on the continent 'Asia'. www.hackerrank.com Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'. Note: CITY.CountryCode and COUNTRY.Code are matching key columns. 해석: 주어진 CITY와 CO.. [MySQL] African Cities[HackerRank Easy] https://www.hackerrank.com/challenges/african-cities/problem?isFullScreen=true African Cities | HackerRank Query the names of all cities on the continent 'Africa'. www.hackerrank.com Given the CITY and COUNTRY tables, query the names of all cities where the CONTINENT is 'Africa'. Note: CITY.CountryCode and COUNTRY.Code are matching key columns. 해석: 주어진 CITY와 COUNTRY 테이블에서 COUNTINENT가 Africa인 모든 .. 이전 1 다음