Practice SQL online with AI-generated problems on fixed, realistic schemas. Write real queries, run them against a live database, and get instant pass/fail against the expected result — joins, aggregation, subqueries, and window functions.
HR — Departments & Employees
A small company directory: departments and employees with salaries, hire dates, and a manager hierarchy. Includes a department with no staff, an employee with no department, and salary ties.
departments · employees
E-commerce — Customers, Orders & Items
An online store: customers, products, orders and their line items. Practice multi-table joins, revenue aggregation, date and status filtering, and top-N queries. Includes a customer with no orders and a cancelled order.
customers · products · orders · order_items
8 of 8 problems