Free practice · Interactive SQL · easy

Practice

Select a focused customer list

Return customer_id and customer_name, in that order, for the first five customer rows. Keep the LIMIT and do not use SELECT *.

Practice database

US customer accounts

A fictional customer directory for hand-checkable beginner queries.

Runs locally in your browser

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

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.