Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
464 B
1
Indexable
Never
SELECT hackers.hacker_id, hackers.name FROM hackers
INNER JOIN submissions ON hackers.hacker_id =submissions.hacker_id INNER JOIN difficulty ON submissions.score = difficulty.score
JOIN challenges ON submissions.challenge_id = challenges.challenge_id AND difficulty.difficulty_level = challenges.difficulty_level
GROUP BY hackers.hacker_id, hackers.name HAVING count(submissions.hacker_id) > 1 ORDER BY count(submissions.submission_id) DESC, submissions.hacker_id;