Concise, example-driven guides for every SQL concept you need as a business analyst.
Beginner SQL is free — start reading right away. Sign up free to unlock Intermediate & Advanced lessons.
Sign up freeSQL Tip of the Day
Use NULLIF(denominator, 0) instead of checking WHERE denominator != 0 — it keeps your row and returns NULL for the ratio instead of erroring or dropping the row entirely.
SELECT basics, WHERE filters, ORDER BY, and LIMIT — the four building blocks every analyst needs.
COUNT, SUM, AVG, MIN, MAX and how to group data into business summaries with HAVING.
Connect tables with INNER JOIN, LEFT JOIN, and self-joins. Know which to use and why.
Scalar subqueries, correlated subqueries, EXISTS, and IN — queries inside queries.
ROW_NUMBER, RANK, LAG/LEAD, and rolling averages — analytics SQL that doesn't collapse your rows.
DATE_TRUNC, EXTRACT, INTERVAL arithmetic, and timezone handling for time-series business data.
Write readable, maintainable queries with Common Table Expressions — including chained and recursive CTEs.
CAC, LTV, churn rate, retention, and MRR waterfall — the metrics that drive SaaS and growth decisions.
8 guides · updated regularly