You are viewing a single comment's thread. Return to all comments →
SELECT t2.hid, h.name, t2.score FROM (SELECT SUM(t1.maxscore) AS score, t1.hid as hid FROM (SELECT MAX(score) AS maxscore, challenge_id AS cid, hacker_id AS hid FROM submissions WHERE score > 0 GROUP BY hacker_id, challenge_id) t1 GROUP BY hid) t2 JOIN hackers h ON h.hacker_id = t2.hid ORDER BY t2.score DESC, t2.hid ASC;
cost is 1232.55 compared to OPs query cost of 3685.0
Seems like cookies are disabled on this browser, please enable them to open this website
Contest Leaderboard
You are viewing a single comment's thread. Return to all comments →
cost is 1232.55 compared to OPs query cost of 3685.0