Learn SQL/Beginner/SQL Foundations/The SQL Tutorial for Data Analysis

The SQL Tutorial for Data Analysis

Not a general programming course—this track is built specifically for pulling answers out of business data.

What & Why

SQL is the language for asking a database questions: which users churned, what campaign spend looked like last quarter, and which product features receive the strongest ratings. Unlike a general-purpose programming language, SQL is built around describing what data you want and letting the database decide how to retrieve it.

This track teaches SQL the way a working analyst uses it: reading real Queryflo domain tables, writing queries against them, and building from single-table basics to advanced analytical patterns.

See How It Works

Every lesson follows the same shape: a short explanation, a worked example with actual columns and output, a mistake to watch for, and a practice exercise you solve yourself.

  • Foundations — SELECT, FROM, aliases, and DISTINCT
  • Filtering, Sorting, and Aggregating — narrowing and summarizing data
  • Joins, Subqueries, and CTEs — combining and structuring complex questions
  • Window Functions and Business Metrics — patterns used in real reports and dashboards
Now You Try

Practice this concept

Write a first query that returns only campaign names from the real Queryflo campaign table.

Available schema
marketing

Prefix tables with marketing.table_name.

name
marketing.campaigns
ColumnType
idinteger
nametext
channeltext
spendnumeric
start_datedate
end_datedate
statustext
target_segmenttext
legacy_idtext
query.sql
Beginner business practice

Sign up free to try it on a real business scenario