Skip to Content
View all events

SQL for Data Analysis

Published by O'Reilly Media, Inc.

Intermediate content levelIntermediate

Practical techniques for cleaning, joining, and analyzing data

What you’ll learn and how you can apply it

  • Clean and transform data directly in SQL
  • Combine and query multiple tables using advanced joins, subqueries, CTEs, and UNION
  • Perform complex aggregations and calculations with window functions
  • Apply common SQL analysis patterns to solve real-world data problems

Course description

The ability to extract meaningful insights directly from databases is a defining skill for modern data analysts and scientists. SQL remains one of the most powerful tools for this purpose, but real-world data challenges go far beyond simple SELECT, FROM, WHERE statements.

Data scientist Kimberly Fessel guides you through techniques that supercharge SQL into a true analysis engine. You’ll learn to clean and transform messy data, combine datasets using joins and subqueries, and perform advanced calculations with window functions. Throughout the session you’ll get hands-on, applying each technique to practical scenarios, including ranking, cohort retention, and outlier detection. You’ll leave with the skills and confidence to think like a data analyst and tackle intermediate SQL challenges in your daily work.

This live event is for you because...

  • You want to become more confident and efficient by cleaning and analyzing data directly in SQL.
  • You’re an analyst, data professional, or aspiring data scientist looking to strengthen your intermediate SQL skills.
  • You currently perform quantitative work and want to handle more advanced analysis within SQL itself.

Prerequisites

  • Access to the O’Reilly MySQL sandbox or MySQL installed on your machine
  • Access to the course database(s) through the MySQL sandbox or by running an instructor-supplied .sql file with MySQL
  • General knowledge about SQL
  • Familiarity with basic SQL query commands (SELECT, FROM, WHERE, etc.)
  • The ability to perform basic SQL joins, including inner and left joins
  • Basic awareness of common data analysis tasks such as detecting missing values or aggregating values across groups

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Introduction and SQL refresher (15 minutes)

  • Presentation: Course overview, learning objectives, brief refresher on SELECT, FROM, WHERE, and GROUP BY
  • Group discussion: What SQL challenges do you encounter most often in your work?
  • Hands-on exercise: Write a query to count records by category in a sample dataset
  • Q&A

Data cleaning and transformation (55 minutes)

  • Presentation: Handling missing values, casting data types, string manipulation, date formatting, and using CASE statements
  • Hands-on exercise: Clean a dataset with mixed data types, missing values, and inconsistent dates
  • Q&A
  • Break

Finding and joining data (55 minutes)

  • Presentation: Subqueries, CTEs, advanced joins, and UNION
  • Hands-on exercise: Combine multiple tables to find items with above-average values
  • Q&A
  • Break

Window functions (55 minutes)

  • Group discussion: What are window functions and how do they simplify multistep queries?
  • Presentation: RANK, LAG/LEAD, running totals, and cumulative calculations
  • Hands-on exercise: Rank items and compute month-over-month growth for a cohort
  • Q&A
  • Break

Analysis patterns (50 minutes)

  • Presentation: Practical patterns for data analysis, including top-N per group, cohort retention, and outlier detection
  • Hands-on exercise: Apply one pattern live and modify it for a new scenario (e.g., detect top-performing items or cohorts)
  • Q&A

Wrap-up and Q&A (10 minutes)

Your Instructor

  • Kimberly Fessel

    Kimberly Fessel is a data scientist and the founder of Dr Kim Data. She and her company specialize in technical instruction and handling messy data from multiple sources. She has over a decade of experience educating groups and individuals in corporate settings, at universities, and as director at a data science bootcamp. She has taught SQL to students for years, both in person and online, and her educational YouTube channel currently has over 20,000 subscribers. Kimberly holds a PhD in applied mathematics from Rensselaer Polytechnic Institute and expects to publish her first book, Head First SQL, second edition, in summer 2026.

Skill covered

SQL