Sandbox

Playground

Every dataset from the course, one free-form editor. No lesson, no grading — just you and the database.

Schemarunning on SQLite
Table: customers
Column NameType
idINTEGER
nameTEXT
countryTEXT
emailTEXT
phoneTEXT
signup_dateDATE

id is primary key. phone is nullable.

Table: employees
Column NameType
idINTEGER
nameTEXT
departmentTEXT
salaryDECIMAL(10,2)
manager_idINTEGER
hire_dateDATE

id is primary key. manager_id is nullable, foreign key -> employees.id.

Table: products
Column NameType
idINTEGER
nameTEXT
categoryTEXT
priceDECIMAL(10,2)

id is primary key.

Table: orders
Column NameType
idINTEGER
customer_idINTEGER
product_idINTEGER
quantityINTEGER
amountDECIMAL(10,2)
statusTEXT
placed_atDATE

id is primary key. customer_id is foreign key -> customers.id. product_id is foreign key -> products.id. amount is quantity * unit price at time of order. status is completed, pending, refunded, or cancelled.

playground.sql

Run your query to see results here.