SQL Fundamentals
SQL is the single most-requested analyst skill because it pulls exactly the data you need directly from the source database.
Learn it
SQL is a declarative language: you describe the rows and columns you want and the database figures out how to get them. The core query is SELECT columns FROM table WHERE conditions ORDER BY column LIMIT n. Once you can filter and sort, you can answer most day-one analyst questions against real tables.
By the end you’ll be able to
- Write SELECT queries with WHERE, ORDER BY, and LIMIT
- Filter rows with comparison and logical operators
Free resources
Practice
Work through the Basic SQL section, writing queries to filter a dataset by multiple WHERE conditions and sort the results.
Build it — your output
A set of working SELECT queries that filter, sort, and limit rows from a real table.
Prove it — check yourself
You’re ready to move on when you can honestly say yes to each:
- Can you filter rows with combined AND/OR conditions?
- Can you sort results and cap them with LIMIT?
- Can you explain the logical order SQL clauses execute in?
Do it with AI
Use a free AI tool as your tutor and pair-programmer. Copy a prompt below into Claude, ChatGPT, or Gemini (for building, try Cursor or Copilot).
The habit: Try it yourself first — a little struggle is where the learning actually happens. Then ask for a hint before the answer — never copy blindly.
- Understand itClaude / ChatGPT / Gemini
I'm a beginner learning "SQL Fundamentals". Explain it in simple terms with a real-world analogy, then ask me ONE question to check my understanding — don't reveal the answer.
- PracticeClaude / ChatGPT / Gemini
Give me 3 short practice problems on "SQL Fundamentals" (my goal: write select queries with where, order by, and limit), from easy to hard. Don't include the solutions yet — I'll try them first, then ask you to check.
- Get unstuckClaude / ChatGPT / Gemini
I'm stuck on this exercise about "SQL Fundamentals": [paste your attempt here]. Give me ONE small hint to move forward — do NOT give me the full solution.
- Build & reviewCursor / Copilot
Here is my work for a "SQL Fundamentals" task: [paste your code or answer]. Review it: point out what's wrong and WHY, and suggest improvements — but let me make the fixes myself.
- Prove itClaude / ChatGPT / Gemini
Quiz me on "SQL Fundamentals". Ask me 5 questions one at a time, wait for my answer each time, then tell me if I'm right and briefly why.