Sort by

recency

|

1419 Discussions

|

  • + 0 comments

    Select c.contest_id, c.hacker_id, c.name, sum(s.total_submissions) as total_submissions, sum(s.total_accepted_submissions) as total_accepted_submissions, sum(v.total_views) as total_views, sum(v.total_unique_views) as total_unique_views from contests c JOIN colleges cl on c.contest_id = cl.contest_id JOIN challenges ch on cl.college_id = ch.college_id LEFT JOIN (Select challenge_Id, sum(total_views) as total_views, sum(total_unique_views) as total_unique_views from view_stats group by challenge_Id) v on ch.challenge_id = v.challenge_id LEFT JOIN (Select challenge_id,sum(total_submissions) as total_submissions, sum(total_accepted_submissions) as total_accepted_submissions from submission_stats group by challenge_Id)s on ch.challenge_id = s.challenge_id group by c.contest_id, c.hacker_id, c.name Having sum(s.total_submissions) >0 OR sum(s.total_accepted_submissions) > 0 OR sum(v.total_views) > 0 OR sum(v.total_unique_views) > 0 order by c.contest_id

  • + 1 comment

    My code is perfect. It has also passed all the test cases. But when I am submitting it it shows an error "We could not process the query/Please submit after some time" . When I view it in submission it has been submitted. Yet I am getting no points for it. Pls help

  • + 0 comments

    My code is perfect. It has also passed all the test cases. But when I am submitting it it shows an error "We could not process the query/Please submit after some time" . When I view it in submission it has been submitted. Yet I am getting no points for it. Pls help

  • + 0 comments

    SELECT c.contest_id, c.hacker_id, c.name, IFNULL(s.ts, 0) AS total_submissions, IFNULL(s.tas, 0) AS total_accepted_submissions, IFNULL(v.tv, 0) AS total_views, IFNULL(v.tuv, 0) AS total_unique_views FROM Contests c LEFT JOIN ( SELECT c.contest_id, SUM(ss.total_submissions) AS ts, SUM(ss.total_accepted_submissions) AS tas FROM Contests c JOIN Colleges co ON co.contest_id = c.contest_id JOIN Challenges ch ON ch.college_id = co.college_id JOIN Submission_Stats ss ON ss.challenge_id = ch.challenge_id GROUP BY c.contest_id ) s ON s.contest_id = c.contest_id LEFT JOIN ( SELECT c.contest_id, SUM(vs.total_views) AS tv, SUM(vs.total_unique_views) AS tuv FROM Contests c JOIN Colleges co ON co.contest_id = c.contest_id JOIN Challenges ch ON ch.college_id = co.college_id JOIN View_Stats vs ON vs.challenge_id = ch.challenge_id GROUP BY c.contest_id ) v ON v.contest_id = c.contest_id WHERE (IFNULL(s.ts,0) + IFNULL(s.tas,0) + IFNULL(v.tv,0) + IFNULL(v.tuv,0)) > 0 ORDER BY c.contest_id;

  • + 0 comments

    SELECT c.contest_id, c.hacker_id, c.name, COALESCE(SUM(ss.total_submissions), 0) as total_submissions, COALESCE(SUM(ss.total_accepted_submissions), 0) as total_accepted_submissions, COALESCE(SUM(vs.total_views), 0) as total_views, COALESCE(SUM(vs.total_unique_views), 0) as total_unique_views FROM Contests c LEFT JOIN Colleges col ON c.contest_id = col.contest_id LEFT JOIN Challenges ch ON col.college_id = ch.college_id LEFT JOIN ( SELECT challenge_id, SUM(total_submissions) as total_submissions, SUM(total_accepted_submissions) as total_accepted_submissions FROM Submission_Stats GROUP BY challenge_id ) ss ON ch.challenge_id = ss.challenge_id LEFT JOIN ( SELECT challenge_id, SUM(total_views) as total_views, SUM(total_unique_views) as total_unique_views FROM View_Stats GROUP BY challenge_id ) vs ON ch.challenge_id = vs.challenge_id GROUP BY c.contest_id, c.hacker_id, c.name HAVING NOT (COALESCE(SUM(ss.total_submissions), 0) = 0 AND COALESCE(SUM(ss.total_accepted_submissions), 0) = 0 AND COALESCE(SUM(vs.total_views), 0) = 0 AND COALESCE(SUM(vs.total_unique_views), 0) = 0) ORDER BY c.contest_id;