SQL Interview Questions for Data Analysts

An 11-module SQL course for data analysts preparing for interviews, built around one consistent company (Kestrel Outfitters) and one repeated method: the Five Questions What is the grain? What rows do I need? How should I combine them? How should I calculate the answer? How do I validate it? Starts with how to approach an unfamiliar SQL problem, then builds through core retrieval, aggregation, joins, subqueries and CTEs, window functions, NULL and conditional logic, reshaping and combining data, working with time, and data quality and validation finishing with a dedicated module on performance for analysts. Every lesson includes a custom diagram and a set of interview questions tagged by difficulty (Screener, Analyst, Advanced, Case) and type (Conceptual, Query Writing, Debugging, Optimization, Business Case), each with a fully worked solution. PostgreSQL-first, with dialect callouts for MySQL, SQL Server, BigQuery, and Snowflake throughout.

author

Rutvik Acharya

Principal Data Scientist

Atlassian

Loading modules...

What You'll Learn

Diagnose any unfamiliar SQL problem using the Five Questions method: grain, rows, combine, calculate, validate

Write joins, subqueries, CTEs, and window functions that hold up under edge cases and interview follow-up questions

Spot and fix the bugs that run cleanly and return the wrong answer — NULL logic, fan-out, silent zeros, timezone drift

Reshape, combine, and validate messy real-world data, including deduplication and referential integrity checks

Who Should Attend

Data analysts actively preparing for SQL interviews at any level, from first screener to senior case rounds

Analysts who know SQL syntax but want a structured method for unfamiliar schemas and ambiguous prompts

Career switchers building interview-ready SQL skills from a single, consistent, realistic dataset

Anyone who has been told "your SQL is fine, but explain your reasoning" and wants to fix that gap

CERTIFICATION

Certificate of Completion

Certificate of Participation
Course
11 Modules
22 Hours 15 Minutes
78 Lessons
169 Interview Questions
Language: English

FAQ

FREQUENTLY ASKED QUESTIONS

Yes, this course assumes you already know basic SQL syntax such as SELECT, WHERE, and JOIN. It is built for interview preparation, not first-time learning, so Module 1 starts with problem-solving method rather than syntax basics. If you are brand new to SQL, a beginner SQL course first will make this one far more useful.
The course is PostgreSQL-first for all examples and exercises, with dialect callouts throughout for MySQL, SQL Server, BigQuery, and Snowflake wherever behavior differs. This mirrors real interviews, where you may be asked about a dialect you don't use day to day.
No installation is required to complete the course, since every lesson explains its output in full. If you want to run the queries yourself, the schema and setup instructions for the course dataset, Kestrel Outfitters, are provided in Module 1 for any local or cloud PostgreSQL instance.
Kestrel Outfitters is a single, realistic fictional company and dataset used consistently across all 11 modules. Rather than switching schemas every lesson, you build depth on one dataset that includes ten deliberate data traps, such as fan-out joins and nullable foreign keys, mirroring the messy data you will actually be asked about in interviews.
Most SQL problem banks test whether you know syntax. This course teaches a repeatable method, the Five Questions, for diagnosing grain, population, joins, calculation, and validation before writing any SQL, which is what interviewers are actually scoring. Every one of the 169 practice questions is tagged by difficulty and type so you can target Screener-level basics or Case-level ambiguity specifically.
These tags reflect difficulty level, matching the stages of a real interview process: Screener for early filtering rounds, Analyst for the standard working bar, Advanced for senior-level edge cases, and Case for open-ended business scenarios. Each question also carries a type tag, Conceptual, Query Writing, Debugging, Optimization, or Business Case, so you can drill a specific weak spot.
Both. The Five Questions method, the correctness patterns in Module 7, and the validation checklist in Module 10 are habits used daily by working analysts, not just interview tricks. Several lessons explicitly cover mistakes that ship to production, like fan-out inflating revenue or NULL-killed filters silently dropping data.
The 11 modules total approximately 22 hours of material across 78 lessons. Most people preparing for an active interview process work through it over 2 to 4 weeks, using the tagged drill sets to revisit specific modules as interviews approach rather than completing everything in strict order.
Yes, a Certificate of Completion is issued once you finish all 11 modules. It's designed to be shared on LinkedIn or included with job applications as evidence of structured, verified SQL interview preparation.
Yes, the modules are designed to stand alone reasonably well if you have the underlying SQL knowledge already. That said, Module 1's Five Questions method and the Kestrel Outfitters dataset are referenced throughout every later module, so it's worth at least skimming Module 1 first even if you skip straight to Joins, Window Functions, or Performance afterward.
Scroll Up
GET FREE CAREER COUNSELING