Free practice · Interactive SQL · easy

Practice

Filter shipped orders

Return order_id and status only for rows whose status is Shipped.

Practice database

US customer orders

Fictional customers, sales employees, and orders with USD amounts.

Runs locally in your browser
Table relationships
employees.manager_idemployees.employee_idorders.customer_idcustomers.customer_idorders.sales_rep_idemployees.employee_id

customers

Customer profile fields used for account reporting.

6 rows

Grain One row per customer

  • customer_idTEXTPK
  • customer_nameTEXT
  • cityTEXT
  • state_codeTEXT
  • segmentTEXT
  • signup_dateTEXT
Preview source rows
customer_idcustomer_namecitystate_codesegmentsignup_date
C-101Northstar HealthAustinTXHealthcare2025-11-15
C-102Blue Ridge BooksRichmondVARetail2025-12-01
C-103Pacific Office WorksSan DiegoCAMidmarket2026-01-08

employees

Sales employees and their reporting relationships.

5 rows

Grain One row per employee

  • employee_idTEXTPK
  • employee_nameTEXT
  • regionTEXT
  • manager_idTEXTFK
Preview source rows
employee_idemployee_nameregionmanager_id
E-10Sam RiveraNationalNULL
E-11Taylor BrooksNationalNULL
E-01Ava PatelEastE-10

orders

Order-level dates, statuses, owners, and USD amounts.

7 rows

Grain One row per order

  • order_idTEXTPK
  • customer_idTEXTFK
  • order_dateTEXT
  • statusTEXT
  • sales_rep_idTEXTFK
  • order_amountREAL
Preview source rows
order_idcustomer_idorder_datestatussales_rep_idorder_amount
O-2001C-1012026-01-05ShippedE-011200
O-2002C-1022026-01-10ProcessingE-02800
O-2003C-1012026-02-02ShippedE-01450

SQL editor

Write one read-only query

SELECT and WITH only
Changes to this practice database are never saved.
Ready to check your work?Edit the starter query, run it, then compare your result with the task.