Hackathons
News
Internships
Forum
Winning Hacks
Loading...
Games are under development. Expect frequent updates and changes.
Back to all games
20 points on win
Medium
SQL Quest
Practice joins, aggregations, filters, and window functions on compact datasets.
SQL Quest
Choose the Correct Query
Goal: get employees whose salary ranks in top 3.
SELECT * FROM employees ORDER BY salary DESC LIMIT 3;
SELECT * FROM ( SELECT *, DENSE_RANK() OVER (ORDER BY salary DESC) rnk FROM employees ) t WHERE rnk <= 3;
SELECT salary FROM employees WHERE salary <= 3;
SELECT * FROM employees GROUP BY salary DESC LIMIT 3;
Submit
Reset