Data Analyst Program

Month 2 of 7 · 20–22 hours

SQL for Data Analysis

SQL (Structured Query Language) is how analysts talk to databases. In this course you will learn how databases are organized, write your first queries, filter and sort results, summarize data with aggregate functions and GROUP BY, and combine tables with joins and subqueries. Every week uses one small online store database so each new skill builds on the last.

Weeks

  1. Week 1Database Basics and SQL SyntaxUnderstand how a database is organized and how a SQL statement is written.4–5 hours · 3 videosDone
  2. Week 2SELECT, WHERE and ORDER BYRetrieve exactly the rows and columns you need, in the order you want.5 hours · 4 videosDone
  3. Week 3Aggregate Functions, GROUP BY and HAVINGTurn many rows into summary numbers, overall and per group.5–6 hours · 3 videosDone
  4. Week 4SQL Joins and SubqueriesCombine data from several tables and answer questions that need two steps.6 hours · 4 videosDone
  5. FinalOnline Store Sales ReportGraded project with a rubric.

What you will be able to do

  • Describe tables, rows, columns, primary keys and foreign keys.
  • Write SELECT queries that choose columns, filter rows with WHERE and sort with ORDER BY.
  • Summarize data with COUNT, SUM, AVG, MIN and MAX.
  • Group results with GROUP BY and filter groups with HAVING.
  • Combine tables with INNER JOIN and LEFT JOIN.
  • Use a subquery to answer a question in two steps.

Before you start

Prerequisites: None, though Course 1 (Excel) helps, because a database table looks a lot like a tidy spreadsheet.

Tools: A free browser-based SQL editor (for example SQLiteOnline or DB Fiddle) needs no installation. If you prefer software, install MySQL Community Server with MySQL Workbench, or PostgreSQL with pgAdmin. All examples use standard SQL that works in each of these.

Schedule

WeekTopicsTime
Week 1Database Basics and SQL Syntax4 to 5 hrs
Week 2SELECT, WHERE and ORDER BY5 hrs
Week 3Aggregate Functions, GROUP BY and HAVING5 to 6 hrs
Week 4SQL Joins and Subqueries6 hrs

Each week includes learning objectives, plain-language lessons with examples, beginner videos, a practice activity, a self-check quiz with answers and a graded assignment.