[HackerRank SQL] Top Competitors
2868 ワード
質問リンク
https://www.hackerrank.com/challenges/full-score/problem
Code link
https://github.com/JamesJung01/Hackerrank_sql/blob/main/02_Medium/Top_Competitors.sql
https://www.hackerrank.com/challenges/full-score/problem
Code link
https://github.com/JamesJung01/Hackerrank_sql/blob/main/02_Medium/Top_Competitors.sql
SELECT h.hacker_id,
h.name
FROM submissions AS s
JOIN challenges AS c
ON s.challenge_id = c.challenge_id
JOIN difficulty AS d
ON c.difficulty_level = d.difficulty_level
JOIN hackers AS h
ON s.hacker_id = h.hacker_id
WHERE s.score = d.score
AND c.difficulty_level = d.difficulty_level
GROUP BY h.hacker_id, h.name
HAVING COUNT(s.hacker_id) > 1
ORDER BY COUNT(s.hacker_id) DESC, s.hacker_id ASC
Reference
この問題について([HackerRank SQL] Top Competitors), 我々は、より多くの情報をここで見つけました https://velog.io/@jamesjung12/HackerRank-SQL-Top-Competitorsテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol