SQL Examples
Real, executable SQL examples for intermediate and advanced techniques — every query runs live against a sample database.
Aggregates
CASE Expressions
CTEs
Subqueries
EXISTS
Group By
Joins
INNER JOIN: Combining Rows From Two Related Tables
joinUse INNER JOIN to attach department names to employee records, keeping only rows that match on both sides.
LEFT JOIN: Keeping Rows That Don't Match
joinUse LEFT JOIN to list every movie alongside its audience rating, including movies that have never been rated.