Top Competitors

Sort by

recency

|

2522 Discussions

|

  • + 0 comments

    ORACLE

    Select
        h.hacker_id,
        h.name
    From hackers h
    Join submissions s
        on h.hacker_id = s.hacker_id
    Join challenges c
        on s.challenge_id = c.challenge_id
    Join difficulty d
        on c.difficulty_level = d.difficulty_level
    Where s.score = d.score
    Group by h.hacker_id, h.name
    Having count(distinct(s.challenge_id)) > 1
    Order by count(distinct(c.challenge_id)) desc, h.hacker_id asc;
    
  • + 0 comments

    select s.hacker_id , h.name from submissions s join challenges c on s.challenge_id = c.challenge_id join difficulty d on c.difficulty_level = d.difficulty_level join hackers h on s.hacker_id = h.hacker_id where s.score = d.score group by s.hacker_id, h.name having count() > 1 order by count() desc, s.hacker_id;

  • + 0 comments

    select s.hacker_id, name from submissions s join hackers h on s.hacker_id = h.hacker_id join Challenges c on s.challenge_id = c.challenge_id join Difficulty d on c.difficulty_level = d.difficulty_level group by s.hacker_id, name having sum(case when s.score = d.score then 1 else 0 end)>1 order by sum(case when s.score = d.score then 1 else 0 end) desc, s.hacker_id

  • + 0 comments
    SELECT h.hacker_id, h.name
    FROM hackers h
    JOIN submissions s ON h.hacker_id = s.hacker_id
    JOIN challenges c ON s.challenge_id = c.challenge_id
    JOIN difficulty d ON c.difficulty_level = d.difficulty_level
    WHERE s.score = d.score
    GROUP BY h.hacker_id, h.name
    HAVING COUNT(DISTINCT c.challenge_id) > 1
    ORDER BY COUNT(DISTINCT c.challenge_id) DESC, h.hacker_id ASC;
    
  • + 0 comments

    my sql : SELECT aaa.hacker_id, b.name FROM ( SELECT a.hacker_id, COUNT(DISTINCT a.challenge_id) AS totchal FROM submissions a LEFT JOIN challenges b ON a.challenge_id = b.challenge_id LEFT JOIN difficulty c ON b.difficulty_level = c.difficulty_level WHERE a.score = c.score GROUP BY a.hacker_id ) aaa LEFT JOIN hackers b ON aaa.hacker_id = b.hacker_id WHERE totchal > 1 ORDER BY totchal DESC, aaa.hacker_id ASC;