Skip to content
Laviyx Learn

Try

SQL Playground

Write SQL and run it instantly on a sample database. Everything runs in your browser; nothing is sent to a server.

Ctrl + Enter (⌘ + Enter on Mac) runs the query. Several statements separated by semicolons run in order.

Loading SQLite…

What is in the sample database?

The playground starts with the same tables the SQL course uses, so you can run the lesson examples and change them to see what happens:

  • employees: names, departments, salaries, cities, managers and hire dates
  • customers and orders: for practising joins
  • products: categories, prices and stock levels
  • monthly_sales and scores: for window functions and rankings

Every SQL practice set is in the Database menu too, so you can try your answers on exactly the tables each set describes.

How it works

The playground runs SQLite, compiled to WebAssembly with the open-source sql.js library, entirely inside your browser. You can create tables, insert, update and delete rows; changes last until you press Reset data or leave the page.

Most of what you learn here works the same in MySQL, PostgreSQL and SQL Server. A few features differ between databases, such as date functions, LIMIT versus TOP, and ANY/ALL, which SQLite does not support. The lessons point these out where they matter.