26 items
Joins, Indexes & Query Optimization
Slides / VideoJoins, Indexes & Optimization
FlashcardJoins, Indexing & Query Speed
Slides / VideoIndexing Join Columns
FlashcardFiltering Aggregated Order Totals
Code QuizJoins with GROUP BY Aggregation
QuizLEFT JOIN Count Miscounts Zero Orders
Code QuizIndexing Join and Aggregation Columns
QuizSQL Joins, Aggregation & Indexing Basics
Slides / VideoJoins, Aggregation & Indexing Basics
FlashcardPre-aggregate before joining fan-out tables
FlashcardFiltering Aggregated Order Counts
Code QuizFiltering Before and After Aggregation
QuizJoins & Aggregation Fan-Out Traps
Slides / VideoJoins Plus GROUP BY and HAVING
Slides / VideoLEFT JOIN with COUNT and GROUP BY
QuizJoins with GROUP BY and HAVING
FlashcardINNER vs LEFT JOIN Behavior
QuizINNER JOIN vs LEFT JOIN
FlashcardINNER vs LEFT JOIN Basics
Slides / VideoFiltering Customers Above Average Order Value
QuizCombining Joins, Aggregation & Subqueries
FlashcardJoins, Aggregations & Subqueries
Slides / VideoJoins, Aggregations, GROUP BY & HAVING
Slides / VideoJoins with GROUP BY and HAVING
QuizJoins with GROUP BY and HAVING
FlashcardFiltering Aggregated Order Totals
Spot the mistake in a JOIN with GROUP BY that tries to filter by a total.
SELECT c.name, SUM(o.amount) AS total FROM customers c JOIN orders o ON o.customer_id = c.id WHERE SUM(o.amount) > 1000 GROUP BY c.name;
What is the bug in this query?