• + 0 comments

    The results are wrong and i dont know where the issue is, any help to put me on the right track will be appriciated: select c.contest_id,c.hacker_id,c.name,sum(s.total_submissions)as total_sub ,sum(s.total_accepted_submissions) as total_acc, sum(v.total_views)as total_v,sum(v.total_unique_views)as total_uv from contests c left join colleges co on c.contest_id = co.contest_id left join challenges ch on co.college_id = ch.college_id left join view_stats v on ch.challenge_id = v.challenge_id left join submission_stats s on ch.challenge_id = s.challenge_id group by c.contest_id,c.hacker_id,c.name having total_sub > 0 or total_acc > 0 or total_v > 0 or total_uv > 0 order by c.contest_id asc