You are viewing a single comment's thread. Return to all comments →
I had to do this to run in oracle. Oracle doesn't allow to group by without having aggregate function in select statement.
select hacker_id, name from ( select h.hacker_id, h.name, count(h.hacker_id) from submissions s inner join challenges c on s.challenge_id = c.challenge_id inner join difficulty d on c.difficulty_level = d.difficulty_level inner join hackers h on s.hacker_id = h.hacker_id where s.score = d.score GROUP by h.hacker_id, h.name having count(h.hacker_id) > 1 ORDER BY count(h.hacker_id) desc, h.hacker_id asc);
Top Competitors
You are viewing a single comment's thread. Return to all comments →
I had to do this to run in oracle. Oracle doesn't allow to group by without having aggregate function in select statement.