SQL for Data Analysis and AI
A small analytics database, checked SQL queries, row-count reconciliation, and an AI-ready data evidence memo.
What you will be able to do
A small analytics database, checked SQL queries, row-count reconciliation, and an AI-ready data evidence memo.
Use a repeatable workflow instead of disconnected tips.
Check assumptions, evidence, output quality, and limitations before using results.
Create a capstone artifact that can be inspected, improved, and reviewed.
What you need before starting
Learners who want to query, join, aggregate, validate, and prepare structured data for analytics and AI workflows.
Comfort reading tables is required. Python Foundations is helpful but not required.
Static lessons, activities, knowledge checks, learner templates, and a downloadable text-first pack.
13-module course sequence
The sequence follows the approved detailed syllabus and is implemented as a complete text-first shell.
Tables, Rows, Columns, Schemas, and Relational Thinking
- By the end of this module you can look at an unfamiliar database and say, out loud and correctly, what one row means in each table, how the tables connect, and which join will silently double your numbers.
- Text-first module with units, activity, knowledge check, and summary.
SELECT, WHERE, ORDER BY, and LIMIT
- By the end of this module you can write a SELECT that says exactly what you mean, predict which rows a filter will silently drop, and use SQL's logical evaluation order to know where an alias is visible and where relying on it will break on another engine.
- Text-first module with units, activity, knowledge check, and summary.
Data Types, Missing Values, and Safe Filtering
- By the end of this module you can predict how NULL behaves in a filter, an aggregate, and a join; decide deliberately whether a missing value means zero or unknown; and report the denominator you actually measured.
- Text-first module with units, activity, knowledge check, and summary.
Aggregation with GROUP BY and HAVING
- By the end of this module you can state what one row of an aggregated result represents, choose between WHERE and HAVING for the right reason, and spot two errors that produce confident wrong numbers: averaging averages, and grouping on values that are not as tidy as they look.
- Text-first module with units, activity, knowledge check, and summary.
Joins, Keys, Row Counts, and Duplicate Traps
- By the end of this module you can predict a join's row count before running it, recognise fan-out from the count alone, fix it without destroying data, and prove that a foreign key is actually kept.
- Text-first module with units, activity, knowledge check, and summary.
Subqueries and Common Table Expressions
- By the end of this module you can build a long query in stages that each prove themselves, name those stages with CTEs, choose between IN, EXISTS, and a join deliberately, and avoid the NOT IN bug that silently returns nothing.
- Text-first module with units, activity, knowledge check, and summary.
Window Functions for Ranking, Running Totals, and Cohorts
- By the end of this module you can compute a total alongside the rows it came from, restart a calculation per group, choose correctly between ROW_NUMBER and RANK when values tie, and build a running total that is actually reproducible.
- Text-first module with units, activity, knowledge check, and summary.
Date and Time Analysis with Period Comparisons
- By the end of this module you can write a date range that cannot silently drop rows, truncate to the period a stakeholder actually means, compare two periods without flattering one of them, and explain why a daily total changes when the timezone does.
- Text-first module with units, activity, knowledge check, and summary.
Text Fields, Categorisation, and Feature Preparation
- By the end of this module you can find the categories a text column is secretly splitting, write a match that does not depend on how someone typed it, build CASE buckets that cannot silently swallow rows, and record your cleaning rules so the result can be reproduced.
- Text-first module with units, activity, knowledge check, and summary.
Query Validation: Reconciliation, Edge Cases, and Sanity Checks
- By the end of this module you can reconcile a figure against an independent source, catch an order-of-magnitude error in ten seconds, test the edge cases that break real reports, and explain a variance instead of rounding it away.
- Text-first module with units, activity, knowledge check, and summary.
SQL plus Python and pandas for Analysis Workflows
- By the end of this module you can decide what belongs in SQL and what belongs in pandas, write queries that cannot be broken by their inputs, catch a silent type change on load, and produce a notebook that reruns to the same answer.
- Text-first module with units, activity, knowledge check, and summary.
AI Data Preparation: Retrieval Tables, Metadata, Permissions, and Audit Fields
- By the end of this module you can shape a table an AI assistant can retrieve from, attach the metadata that makes an answer checkable, enforce permissions in the data rather than the prompt, and decide what must not be exposed at all.
- Text-first module with units, activity, knowledge check, and summary.
Capstone: Analysis-Ready Dataset and SQL Evidence Memo
- In this capstone you will produce a small analysis-ready dataset, answer eight business questions from it, reconcile every figure you report, and write an evidence memo a sceptical reviewer can check without asking you a single question.
- Text-first module with units, activity, knowledge check, and summary.
Text-first release boundary
The course content, static lessons, and download pack are available now. Leonardo/image assets, external specialist review, and learner pilot evidence remain planned improvements.
