Top Competitors

  • + 1 comment

    guys help me out with the below query and why the condition score = 100 is not to be used. Many people under discussions have not used that any reasons????

    SELECT hackers.hacker_id, hackers.name FROM submissions JOIN hackers ON submissions.hacker_id = hackers.hacker_id JOIN challenges ON submissions.challenge_id = challenges.challenge_id JOIN difficulty ON difficulty.difficulty_level = challenges.difficulty_level AND difficulty.score = submissions.score WHERE submissions.score = 100 GROUP BY hackers.hacker_id, hackers.name HAVING COUNT(submissions.hacker_id) > 1 ORDER BY COUNT(submissions.hacker_id) DESC, hackers.hacker_id ASC;