Excel to SQL · Lesson 1 of 12

A database is just a stack of spreadsheets

In Excel, you'd reach for
fxOpening a sheet and looking at it

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.

Try itEdit the query, then Run
idnameemailcountrysignup_dateacquisition_channel
1Kavya Haddadkavya.haddad334@example.comUnited States2026-01-01social
2Ben Kimben.kim404@example.comIndia2026-01-01partner
3Kavya Kimkavya.kim283@example.comIndia2026-01-02organic_search
4Nikhil Tanakanikhil.tanaka266@example.comNigeria2026-01-05referral
5Elena Nguyenelena.nguyen194@example.comUnited Kingdom2026-01-06social
6Leo Garcialeo.garcia59@example.comNigeria2026-01-07social
7Tara Alitara.ali374@example.comGermany2026-01-07organic_search
8Quinn Lopezquinn.lopez91@example.comUnited States2026-01-08organic_search
9Sam Okaforsam.okafor21@example.comBrazil2026-01-10organic_search
10Ben Smithben.smith333@example.comUnited States2026-01-10organic_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.

This page on one card

A database is just a stack of spreadsheets: the Excel way (Opening a sheet and looking at it) and the SQL query, side by side
A database is just a stack of spreadsheets, on one card: the Excel way and the SQL. Download · Save to Pinterest
The practice data (7 tables)

See every column and sample rows