Course 3 of 7 · 13 lessons · Free
SQL for Data Analysis
Query, join and summarise data in relational databases, from first SELECT to window functions.
Comes after: Power BI Mastery
- What Is SQL? Your First SELECTLearn how relational databases store data in tables, meet the sample database and write your first queries.
- Filtering Rows with WHEREKeep only the rows you need using comparisons, AND, OR, IN, BETWEEN, LIKE and correct handling of NULL.
- Sorting, Limiting and DISTINCTOrder results, take the top rows, page through data and remove duplicate values.
- Aggregate Functions and GROUP BYSummarise data with COUNT, SUM and AVG, group it by category and filter the groups with HAVING.
- Joining Tables with INNER JOINCombine rows from related tables on a shared key, the single most important skill in SQL.
- LEFT JOIN, Self Joins and Finding Missing DataKeep rows that have no match, find customers with no orders and join a table to itself.
- SubqueriesUse the result of one query inside another: in WHERE, in FROM and row by row with correlated subqueries.
- Common Table Expressions (WITH)Break a long query into named, readable steps, and generate sequences with a recursive CTE.
- CASE Expressions and Built-in FunctionsAdd conditional logic to a query and work with text, numbers, dates and missing values.
- Window FunctionsRank rows, calculate running totals and compare each row with the previous one, without collapsing the rows.
- Creating Tables and Changing DataDefine tables with the right types and constraints, then insert, update and delete rows safely inside transactions.
- Indexes and Query PerformanceUnderstand why some queries are slow, how an index speeds them up and how to read a query plan.
- Project: Analyse a Shop Database with SQLAnswer eight real business questions with the skills from this course, each harder than the last.