Free SQL tutorial
- What is SQL The one language every data job interviews around.
- SELECT and WHERE Pick columns and filter rows.
- IN, LIKE, BETWEEN Smarter conditions for real text and ranges.
- ORDER BY and LIMIT Sort results and take the top N.
- COUNT, SUM, AVG The functions that turn rows into answers.
- GROUP BY and HAVING Answers per category, the heart of analytics.
- JOINs Combine tables on a key, and watch out for grain.
- CASE and COALESCE Computed columns and friendly NULLs.
- Dates and strings Buckets, windows, and cleanup.
- Subqueries and CTEs Build queries in named steps.
- Window functions Aggregate without collapsing rows.
- ROW_NUMBER, RANK, DENSE_RANK Rank and pick top-N per group.
- LAG, LEAD, running totals Compare a row to other rows in time.
- Execution order and slow queries Why queries behave and how to speed them up.
- Second highest salary The classic interview question, solved three ways.
- Find duplicate rows Spot repeated values with GROUP BY and HAVING.
- WHERE vs HAVING Filter rows before grouping, filter groups after.