
8 episodes, about 59 min 1 view across the series
Topics: Software and data foundations
SQL Interview Refresher
Created by Abhyuday DesaiUpdated , episode 8
A refresher on the SQL that data science and machine learning interviews ask for: aggregations, joins, NULL, subqueries, CTEs, window functions, and the question patterns built on them.
Start with episode 1Part oneThe clauses most questions are built on
- 01 Watch
SQL Aggregations
Turn many order rows into one number per customer: COUNT, SUM, AVG, MIN and MAX, GROUP BY and HAVING, and conditional aggregation with CASE.
- 02 Watch
SQL Joins
How joins match rows and which rows survive: candidate pairs and the ON predicate, the preservation rule of each join type, fan-out, ON versus WHERE, and self-joins.
- 03 Watch
SQL NULL Semantics
Why a filter that looks right returns nothing: NULL as unknown, three-valued logic, IS NULL and COALESCE, NULL in counts, joins and the NOT IN trap.
Part twoStructuring an answer
- 04 Watch
SQL Subqueries
A query inside a query, and when to use each form: scalar, IN, EXISTS and correlated subqueries, the NOT IN plus NULL trap, and subquery versus JOIN versus CTE.
- 05 Watch
SQL CTEs
Write long queries you can actually read: the WITH clause, CTE versus subquery, chaining steps into a pipeline, and recursive CTEs for hierarchies.
- 06 Watch
SQL Window Functions
Compute across rows and keep every row: GROUP BY versus OVER, PARTITION BY and ORDER BY, ROW_NUMBER, RANK and DENSE_RANK, LAG, and running totals.
Part threeThe question families
- 07 Watch
SQL Interview Prompts: Ranking and Presence
The four families of SQL interview prompts, then the first two worked: latest per customer with ROW_NUMBER, repeated values with GROUP BY and HAVING, and active in one month but not the next.
- 08 Watch
SQL Interview Prompts: Time-Series
Running totals and month-over-month change as interviews ask for them: window SUM and its peer trap, fix the grain before LAG, the missing month, then the cheat sheet for all four families.