Top Competitors

  • + 1 comment

    I have almost the same code as yours except that I join submissions and challenges tables on two coditions: s.challenge_id = c.challenge_id and a.hacker_id = c.hacker_id. I did so because chanllenges table does not suggest difficulty_level is related to chanllenge_id only, it might be related to tracker_id as it shows in sample table. I think my code is more conservative in this sense. However, it gives wrong output. The question needs to either remove tracker_id column from challenge table or specify challenge_id is unique key or make the real challenge table complete with all tracker_id conditions.