Blog

Short, friendly articles about the SQL ideas behind the path.

How to practice SQL online for free

A practical guide to learning SQL by writing queries: what a good practice setup needs, a 20-minute routine, and three queries you can run right now.

SQL join exercises with answers

Three join exercises worked end to end — tracks and albums, employees who manage nobody, and a three-table join — with the SQL and the reasoning.

ROW_NUMBER vs RANK vs DENSE_RANK

The three ranking functions look identical until there is a tie. See the difference in one query, then use PARTITION BY to rank inside each group.

CTE vs subquery: when to use each

Both express the same idea. Use a subquery for one quick lookup, a CTE when the result has a name or is needed twice — with examples from the course.

SQLite vs PostgreSQL date functions

Dates as text versus real date types: a side-by-side of strftime, julianday, date_trunc and intervals, with examples that run on the course database.

GROUP BY in plain words

What really happens when SQL groups rows: counting, summing and the difference between WHERE and HAVING.