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.
Why I cann't submit below code? This code works fine when i run it, but got error : "we couldn't process your submission,submit your code again"
MySQL Code :
SELECT con.contest_id, con.hacker_id, con.name, sum(ts) as t_s, sum(tas) as t_a_s, sum(tv) as t_v, sum(tuv) as t_u_v
FROM Contests AS con
INNER JOIN Colleges AS col ON con.contest_id=col.contest_id
INNER JOIN Challenges AS chal ON col.college_id=chal.college_id
LEFT JOIN (
SELECT challenge_id, sum(total_views) as tv, sum(total_unique_views) as tuv
FROM View_Stats
GROUP BY challenge_id ) AS vie
ON chal.challenge_id=vie.challenge_id
LEFT JOIN (
SELECT challenge_id, sum(total_submissions) as ts, sum(total_accepted_submissions) as tas
FROM Submission_Stats
GROUP BY challenge_id) as sub
ON chal.challenge_id=sub.challenge_id
GROUP BY con.contest_id, con.hacker_id, con.name
HAVING ( t_s + t_a_s + t_v + t_u_v ) >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 →
Why I cann't submit below code? This code works fine when i run it, but got error : "we couldn't process your submission,submit your code again" MySQL Code : SELECT con.contest_id, con.hacker_id, con.name, sum(ts) as t_s, sum(tas) as t_a_s, sum(tv) as t_v, sum(tuv) as t_u_v FROM Contests AS con INNER JOIN Colleges AS col ON con.contest_id=col.contest_id INNER JOIN Challenges AS chal ON col.college_id=chal.college_id LEFT JOIN ( SELECT challenge_id, sum(total_views) as tv, sum(total_unique_views) as tuv FROM View_Stats GROUP BY challenge_id ) AS vie ON chal.challenge_id=vie.challenge_id LEFT JOIN ( SELECT challenge_id, sum(total_submissions) as ts, sum(total_accepted_submissions) as tas FROM Submission_Stats GROUP BY challenge_id) as sub ON chal.challenge_id=sub.challenge_id GROUP BY con.contest_id, con.hacker_id, con.name HAVING ( t_s + t_a_s + t_v + t_u_v ) >0 ORDER BY con.contest_id