Free practice · Interactive SQL · easy
Practice
Preview the orders table
Complete the read-only preview so it returns order_id, customer_id, order_date, and status in that order. Keep the five-row limit.
Table relationshipsorders.customer_id→customers.customer_idorder_items.order_id→orders.order_id
customers
Customer profile fields used for service and reporting.
3 rowsGrain One row per customer
customer_idTEXTPKcustomer_nameTEXTstate_codeTEXTsegmentTEXT
Preview source rows
orders
Order-level dates, statuses, and amounts.
4 rowsGrain One row per order
order_idTEXTPKcustomer_idTEXTFKorder_dateTEXTstatusTEXTorder_amountREAL
Preview source rows
order_items
Product-level line items belonging to an order.
5 rowsGrain One row per product on an order
order_idTEXTFKproduct_idTEXTquantityINTEGERunit_priceREAL
Preview source rows
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.