// articles · learn & grow
Expert-written tutorials, guides, and deep dives into SQL — from basics to advanced optimization. Direct answers, examples, and FAQs.
// LATEST ARTICLES37 ARTICLES

This is the retail and e-commerce interview classic: find product pairs frequently bought together. One line of self-join logic makes or breaks the answer.

YoY growth questions test whether a candidate reaches for LAG or a clunky self-join, and whether they remember to guard against divide-by-zero. A full walkthrough with both engines.

Retention questions are a growth team staple in SQL interviews. This walks through the exact query, the schema, and the integer division bug that quietly wrecks an otherwise correct solution.

Window functions are the single most common topic in SQL interviews that separates candidates who understand real analytics from those who only know basic SELECT statements. Here is the exact rolling average question interviewers ask, solved in SQLite and PostgreSQL.

A single-page SQL reference covering JOINs, window functions, CTEs, NULL handling, CASE WHEN, string/date functions, constraints, common query patterns, and more.

Learn how SQL injection attacks actually work — authentication bypass, UNION-based data exfiltration — and how parameterized queries prevent them structurally.

Learn to write idempotent SQL for migrations, seed scripts, and ETL jobs — safe upserts, guarded schema changes, and the relative-update trap that compounds on re-run.

Learn to build Recency, Frequency, Monetary (RFM) customer segmentation in SQL using NTILE, including the recency-inversion gotcha and segment-level reporting.

Learn to analyze A/B tests in SQL — conversion rate by variant, sample ratio mismatch checks, a two-proportion z-test, and common statistical pitfalls like peeking.

A practical decision framework for choosing between a CTE, subquery, temp table, view, or materialized view in SQL, with a comparison table and real tradeoffs.
// FAQ
Interview prep, query patterns, window functions and CTEs, performance and optimization, fundamentals, and best practices — from beginner SELECT queries to advanced grouping, joins, and subqueries.
Yes. All published articles on SqlInt are free to read with no signup required, and most include a free PDF download.
Yes. Every article page has a Download PDF button that generates a printable PDF with working links — including the free SQL cheat sheet.
New tutorials and guides are added regularly. Subscribe via the RSS feed at sqlint.com/rss.xml to get new articles as they publish.
Start with the Beginner and Fundamentals categories, then move to Interview Prep and Query Pattern articles once you can write basic SELECT, WHERE, GROUP BY, and JOIN queries.