Learn Without Walls
← Back to Phase 1
Phase 1 — Data Foundations
Module 2 of 14

SQL Foundations

Ask questions of data. Write your first query — live, in your browser, right now.

~20 minutes
📌 Before You Start

What you need: Open sqliteonline.com in a new tab. No account needed. No installation. SQL runs directly in your browser.

What you’ll do: Write your first SQL query today. By the end of this module, you will have used SELECT, FROM, WHERE, and ORDER BY — the four keywords that cover 80% of real analyst work.

💡 The Concept

SQL (pronounced “sequel”) stands for Structured Query Language. It’s how you talk to databases.

A database is a collection of organized tables — like spreadsheets, but more powerful and designed to handle millions of rows. Every company stores their important data in databases: customers, orders, employees, inventory, transactions.

You use SQL to ask questions of that data:

Four keywords get you 80% of the way:

SELECT
Which columns to show
FROM
Which table to get data from
WHERE
Filter rows by condition
ORDER BY
Sort the results
🔗 Why It Matters

SQL is the #1 skill for data analysts. It appears on almost every data job posting — entry level through senior.

Companies store everything in databases. You need SQL to get to that data. It is not optional — it is the foundation. The good news: basic SQL is simple and learnable in a single sitting. You are doing it today.

SQL is also the first step toward understanding SAP (Phase 5). SAP stores all its data in massive databases. Analysts who can write SQL queries against SAP data are extremely valuable.

🛠️ Tool Setup — SQLiteOnline.com

One-time setup. Takes 60 seconds.

1
Go to sqliteonline.com in a new tab.
2
Click “Demo” in the top menu. This loads a sample database with real tables to query.
3
You will see: a panel on the left (list of tables), a text area in the middle (where you write SQL), and a results area below. That’s the whole interface.
4
That’s it. You are ready to write SQL.
🖐️ Practice

Switch to your SQLiteOnline.com tab. Type each query into the text area and click Run (or press Ctrl+Enter / Cmd+Enter).

1
Type this into the SQL text area and click Run:
Type this in SQLiteOnline.com ↓
SELECT * FROM demo;
You just asked: “Show me everything from the demo table.” The * means “all columns.” Read the results. What columns do you see?
2
Now try a WHERE filter:
Type this ↓
SELECT * FROM demo WHERE id = 1;
This asks: “Show me only the row where the id column equals 1.” You should see exactly one row. WHERE filters your results.
3
Now sort your results:
Type this ↓
SELECT * FROM demo ORDER BY id DESC;
This asks: “Show me everything, sorted by id from highest to lowest.” DESC means descending. ASC (ascending) is the default.
4
Select only specific columns:
Type this ↓
SELECT id, name FROM demo;
Instead of * (all columns), you named exactly which columns you want. This is how you reduce output to only what matters.
5
Combine WHERE and ORDER BY:
Type this ↓
SELECT id, name FROM demo WHERE id > 2 ORDER BY name ASC;
“Show me only the id and name columns, but only rows where id is greater than 2, sorted alphabetically by name.”
6
Experiment freely. Change the WHERE value. Change the column names. Change ORDER BY to a different column. Try breaking it — see the error message. Breaking things and reading error messages is a core analyst skill. You cannot hurt anything here.
🛑 Good stopping point. Bookmark this page and come back anytime.
🧠 Brain Break

SQL is a language. You just spoke it for the first time. Your brain is building new neural pathways right now — that is literally what learning feels like, and it takes real energy.

Stand up and stretch Arms overhead, hold 5 seconds Shake out your hands Drink some water

Take at least 2 minutes. You earned it.

✅ You Got This

The four things you now know how to do:

SELECT gets columns • FROM names the table • WHERE filters rows • ORDER BY sorts results. You know SQL.

What comes next: Module 3 is about data cleaning — why real data is always messy and how to fix it before you analyze it. Same tools: Google Sheets.

← Module 1: What Is Data Analytics? 📋 Course Home Module 3: Data Cleaning →