SQL guides with examples
Follow sample queries and explore interactive examples of joins, grouping, and sorting.
SQL SELECT and WHERE for beginners
Use SELECT, WHERE, and ORDER BY to produce a short list of affordable albums that are in stock.
SQL joins explained visually
Switch between INNER, LEFT, RIGHT, and FULL JOIN to see which album and sale rows appear in the result.
SQL LEFT JOIN with unmatched rows
Use LEFT JOIN to calculate total copies sold for every album, including albums with zero sales.
SQL ROW_NUMBER with PARTITION BY
Use ROW_NUMBER and PARTITION BY to find the two best-selling albums in each genre.
GROUP BY vs ORDER BY, explained visually
Compare sorting album rows, combining them into genre totals, and sorting those totals.
Filter rows and groups with WHERE and HAVING
Build an inventory report and see how filtering before and after GROUP BY changes the result.
SQL window functions with examples
Show each album alongside average stock for its genre with AVG and PARTITION BY.
SQL CTEs with WITH
Use common table expressions to name intermediate results, then inspect each stage of a channel revenue report.
