Excel to SQL · Lesson 1 of 12
A database is just a stack of spreadsheets
A database is a workbook. Each table is a sheet. Each table has named columns (like your header row) and rows (one per record). That is genuinely most of it.
The difference: in Excel you look at the sheet and scroll. In SQL you ask for what you want, and the database hands you a fresh, tidy result. Asking starts with SELECT (which columns) and FROM (which table).
The practice data on this site is a made-up software company called Brightdesk. Run the query below to see its customers. * means "every column", and LIMIT 10 means "just show me the first ten rows", like peeking at the top of a sheet.
| id | name | country | signup_date | acquisition_channel | |
|---|---|---|---|---|---|
| 1 | Kavya Haddad | kavya.haddad334@example.com | United States | 2026-01-01 | social |
| 2 | Ben Kim | ben.kim404@example.com | India | 2026-01-01 | partner |
| 3 | Kavya Kim | kavya.kim283@example.com | India | 2026-01-02 | organic_search |
| 4 | Nikhil Tanaka | nikhil.tanaka266@example.com | Nigeria | 2026-01-05 | referral |
| 5 | Elena Nguyen | elena.nguyen194@example.com | United Kingdom | 2026-01-06 | social |
| 6 | Leo Garcia | leo.garcia59@example.com | Nigeria | 2026-01-07 | social |
| 7 | Tara Ali | tara.ali374@example.com | Germany | 2026-01-07 | organic_search |
| 8 | Quinn Lopez | quinn.lopez91@example.com | United States | 2026-01-08 | organic_search |
| 9 | Sam Okafor | sam.okafor21@example.com | Brazil | 2026-01-10 | organic_search |
| 10 | Ben Smith | ben.smith333@example.com | United States | 2026-01-10 | organic_search |
10 rows
Want only some columns? Name them, separated by commas. The order you list them is the order they come back in, which is like dragging columns around, except nothing in the original moves.
Your turn
Show just the name and country of every customer.
List the two column names after SELECT, with a comma between them.
This page on one card
