• + 0 comments

    Anyone help on this what is issue in this ORACLE Query ,i am not getting proper answer SELECT con.contest_id, con.hacker_id, con.name, SUM(view2.total_submissions) AS total_submissions, SUM(view2.total_accepted_submissions) AS total_accepted_submissions, SUM(view1.total_views) AS total_views, SUM(view1.total_unique_views) AS total_unique_views FROM contests con INNER JOIN colleges c ON con.contest_id = c.contest_id INNER JOIN challenges ch ON c.college_id = ch.college_id INNER JOIN view_stats view1 ON ch.challenge_id = view1.challenge_id INNER JOIN submission_stats view2 ON ch.challenge_id = view2.challenge_id GROUP BY con.contest_id, con.hacker_id, con.name HAVING SUM(view2.total_submissions) > 0 OR SUM(view2.total_accepted_submissions) > 0 OR SUM(view1.total_views) > 0 OR SUM(view1.total_unique_views) > 0 ORDER BY con.contest_id;