You are viewing a single comment's thread. Return to all comments →
Formatted so that it is more readable:
SELECT CT.contest_id, CT.hacker_id, CT.name, Sum(ts), Sum(tas), Sum(tv), Sum(tuv) FROM contests CT INNER JOIN colleges AS CL ON CL.contest_id = CT.contest_id INNER JOIN challenges AS CH ON CH.college_id = CL.college_id LEFT JOIN (SELECT challenge_id, Sum(total_submissions) AS TS, Sum(total_accepted_submissions) AS TAS FROM submission_stats GROUP BY challenge_id) S ON S.challenge_id = CH.challenge_id LEFT JOIN (SELECT challenge_id, Sum(total_views) AS TV, Sum(total_unique_views) AS TUV FROM view_stats GROUP BY challenge_id) V ON V.challenge_id = CH.challenge_id GROUP BY CT.contest_id ORDER BY CT.contest_id;
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 →
Formatted so that it is more readable: