🚀 New batches open: Advanced Excel • Power BI • SQL • AI for Analytics — Book a free demo
Home / SQL Tutorial / Demo database

The demo database

Five small tables that every example in this tutorial runs against. Keep this page open in a second tab while you learn.

The demo database

Every example in this tutorial runs against these five tables. They are small enough to read in full, which makes it easy to check whether a query gave you the right answer.

Nothing is saved — reload the page and the data is back to normal, so experiment freely.

Customers

Who buys from us. Note that Bose Logistics has a NULL Segment, and has never placed an order — both deliberate, for the NULL and LEFT JOIN lessons.

Orders

One row per order. CustomerID links back to Customers.

Products

OrderItems

The lines within each order. This is what links Orders to Products, and it is why some joins need three tables.

Employees

ManagerID points at another row in this same table — that is what makes a self join possible.

Try any query you like

What this playground supports

It is a teaching engine, not a real database. It handles:

  • SELECT, DISTINCT, AS, *
  • WHERE with = <> > < >= <=, AND, OR, NOT, IN, BETWEEN, LIKE, IS NULL
  • INNER JOIN and LEFT JOIN, including self joins and three or more tables
  • GROUP BY, HAVING, ORDER BY, LIMIT and TOP
  • COUNT, SUM, AVG, MIN, MAX, ROUND, UPPER, LOWER, LENGTH, CONCAT

Subqueries, window functions, INSERT, UPDATE and date functions are not supported — you will meet those on the full course, on a real SQL Server.

If something is not supported The playground tells you so rather than guessing. A teaching tool that quietly returns a wrong answer would be worse than useless.

Want this taught properly?

This tutorial covers the basics. Our SQL course in Noida takes you through window functions, CTEs and stored procedures on a real database, with projects and mentor support.

See the SQL course →