Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
SQL for Data Analysts: 160 Exercises and Mock Interviews
Role Play
Rating: 5.0 out of 5(2 ratings)
5 students

SQL for Data Analysts: 160 Exercises and Mock Interviews

Practice the SQL analysts use daily, from filtering and joins to window functions, with two projects and mock interviews
Created bySoundhar K
Last updated 10/2026
English

What you'll learn

  • Write SQL that answers everyday analyst questions with filtering, sorting, aggregation and GROUP BY.
  • Combine data from several tables with joins, subqueries and common table expressions.
  • Use window functions and conditional logic to build rankings, running totals and period-over-period comparisons.
  • Analyze an e-commerce sales dataset end to end in a mini project, from raw orders to business metrics.
  • Explore a movie and streaming dataset in a second project, answering questions about content and viewing behavior.
  • Explain your queries out loud in mock interviews for data analyst roles.

Coding Exercises

This course includes our updated coding exercises so you can practice your skills as you learn.

See a demo
Image of coding exercise example

Course content

7 sections • 7 lectures • 30m total length
  • Getting Started3:42
  • Building Queries2:56
  • Summarizing Data2:55
  • Connecting Tables3:00
  • Subqueries & CASE7:45
  • Window Functions & CTEs7:16
  • From Concepts to Practice2:45

Requirements

  • Nothing to install. The exercises run in the browser inside the course, so a computer with an internet connection is enough.
  • No prior SQL is required for the beginner tier, though knowing what a table, row and column are will help on day one.

Description

Most analyst work comes down to a handful of SQL patterns used again and again: filter the right rows, join the right tables, group and aggregate, then compare periods or rank results. Knowing the syntax is the easy part. Writing the query quickly and correctly when the question is phrased like a business request is what takes practice.

This course is 160 hands-on SQL coding exercises for data analysts, organized in three tiers, followed by two mini projects and a set of mock interviews. Short lectures explain how the course works. Every exercise runs in your browser and is checked automatically, so you find out immediately whether your result is right.

The questions are written the way analyst requests arrive at work: which customers bought twice in a month, which products lost revenue compared with last quarter, which titles are most watched by region. Part of the practice is turning that wording into the right query, which is exactly what interviews test.

What's inside

  • Beginner tier: selecting and filtering, sorting, basic functions and simple aggregation.
  • Intermediate tier: GROUP BY and HAVING, joins across several tables, CASE logic and subqueries.
  • Advanced tier: common table expressions, window functions, rankings, running totals and trickier business questions.
  • Mini project 1: an e-commerce sales analysis, working from orders and customers to revenue and product metrics.
  • Mini project 2: a movie and streaming analysis, answering questions about titles, ratings and viewing.
  • Mock interviews: role plays where you explain your approach to analyst-style SQL questions.

Why the projects matter

Exercises build individual skills. The projects show you how they fit together on one dataset, the way a real analysis does. You'll see how an early decision, like which table to start from or how to handle missing values, affects every query after it.

How to use the course

Work through the tiers in order if you're building your SQL from the ground up. If you already know the basics, start with the intermediate tier and do the projects next. Save the mock interviews for when you're preparing for applications. Try every exercise before checking hints.

Who it's for

Aspiring data analysts, current analysts who want faster, more confident SQL, business and Excel users moving into SQL, and anyone preparing for a data analyst interview. You can start with no SQL experience.

What you need

A browser. Everything runs in the course's built-in editor, so there's nothing to install.

Who this course is for:

  • Aspiring data analysts who have watched SQL tutorials but stall when they face a blank editor and a business question
  • Students and freshers preparing for SQL technical rounds and online assessments for analyst roles
  • Analysts who know the basics but haven't yet used window functions and CTEs on real business problems
  • Professionals in reporting, operations or Excel-heavy roles who want to pull their own data with SQL instead of waiting on someone else