[HackerRank] Placements 문제 풀이 mysql
by darami[HackerRank] Placements 문제 풀이 mysql
Placements | HackerRank
Write a query to output the names of those students whose best friends got offered a higher salary than them.
www.hackerrank.com
SELECT s.name as name
FROM Students s
JOIN Friends f ON f.id=s.id
JOIN Packages p ON p.id=s.id
JOIN Packages p2 ON f.friend_id=p2.id
WHERE p2.salary > p.salary
ORDER BY p2.salary
정말 빠르고 쉽게 풀었다.
실력이 늘고 있는게 느껴진다. 뿌듯하다!
+ SQL 스터디로 다양한 문제 풀이 보강
'SQL > HackerRank,프로그래머스' 카테고리의 다른 글
[HackerRank] Symmetric Pairs mysql (0) | 2022.05.22 |
---|---|
[HackerRank] SQL Project Planning mysql 문제 풀이 (0) | 2022.05.20 |
[HackerRank] Contest Leaderboard 문제 풀이 mysql (0) | 2022.05.18 |
[HackerRank] Challenges 문제 풀이 mysql (0) | 2022.05.17 |
[HackerRank] Ollivander's Inventory 문제 풀이 mysql (0) | 2022.05.14 |
블로그의 정보
다람
darami