SQL Advance

SQL Query Dojo — computermafia.com

    About this game

    How to play SQL Query Dojo

    SQL Query Dojo is the advanced SQL training ground. You write real queries against a small school database of students, courses, teachers and fees, and you work your way up through the belts from White to Black. Each mission sets a realistic task, and your query is run and checked against the correct result.

    🎯 What it teaches

    • Choosing columns, renaming them with aliases, removing duplicates with DISTINCT and sorting with ORDER BY and LIMIT.
    • Filtering with WHERE, AND/OR, IN, BETWEEN, LIKE and IS NULL.
    • Aggregates: COUNT, SUM, AVG, MIN and MAX, with GROUP BY and HAVING.
    • Joins across two and three tables, including outer joins that find rows with no match.
    • Subqueries, CASE expressions and UNION.
    • Changing data with INSERT, UPDATE and DELETE, and designing your own table with CREATE TABLE.

    🕹️ How to play

    1. Start at White Belt with missions like Open the register and Only what you need.
    2. Read the mission, write your query and run it. Compare your result table with what the mission asked for.
    3. Pass every mission in a belt to move up to Yellow, Orange, Green, Blue, Brown and finally Black Belt.

    💡 Tips

    • Build big queries in small pieces. Get the FROM and JOIN right first, then add WHERE, then GROUP BY.
    • WHERE filters rows before grouping and HAVING filters groups after it. Mixing them up is the most common mistake.
    • With UPDATE and DELETE, write the WHERE clause first. Leaving it out changes every row.

    👥 Who it is for

    This dojo is for students who already know basic SELECT statements and want to get to interview and exam level. That includes college students, people preparing for data-analyst roles, and developers brushing up their SQL.

    Free to play on computermafia.com. No sign-up, nothing to install.