We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
SELECT
con.contest_id,
con.hacker_id,
con.name,
SUM(ss.total_submissions) AS total_submissions,
SUM(ss.total_accepted_submissions) AS total_accepted_submissions,
SUM(vs.total_views) AS total_views,
SUM(vs.total_unique_views) AS total_unique_views
FROM Contests AS con
JOIN Colleges AS col
ON con.contest_id = col.contest_id
JOIN Challenges AS ch
ON col.college_id = ch.college_id
LEFT JOIN View_Stats AS vs
ON ch.challenge_id = vs.challenge_id
LEFT JOIN Submission_Stats AS ss
ON ch.challenge_id = ss.challenge_id
GROUP BY con.contest_id, con.hacker_id, con.name
HAVING
SUM(ss.total_submissions) > 0
OR SUM(ss.total_accepted_submissions) > 0
OR SUM(vs.total_views) > 0
OR SUM(vs.total_unique_views) > 0
ORDER BY con.contest_id;
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Interviews
You are viewing a single comment's thread. Return to all comments →