SRS Badger

SQL: an online store

2 chapters · 8 problems

An example course: real queries against a small shop database (customers, products, orders and order items). It runs on SQLite, right in your browser.

Your query is checked by running it next to a reference query and comparing the results, so any query that gets the right rows passes. Column names and order matter, and each card tells you what it wants.

This is the kind of SQL that's easy to understand and hard to write from memory when you need it: joins, GROUP BY, HAVING, subqueries.

What's inside

  1. Filtering, sorting and counting
    3 problems

    The everyday stuff. Every card in this course uses the same four tables. Open the schema under the editor to see them.

  2. Joins and grouping
    5 problems

    Putting tables together. Getting the join right is most of the work; the grouping follows from it.