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

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 calculate running totals, moving averages, and percent-of-total in SQL using window functions and frame clauses, with common mistakes and date-gap handling.

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

A complete guide to SQL window functions — RANK, DENSE_RANK, ROW_NUMBER, LAG/LEAD, NTILE, and aggregate window functions, with frame clauses and performance notes explained.

Prepare for your SQL interview with all 20 essential questions covering joins, window functions, CTEs, indexing, transactions, and optimization, plus 5 bonus practical query challenges.

Master the gaps and islands SQL interview pattern — find consecutive streaks and missing values using ROW_NUMBER, LAG, and running-sum techniques, with database compatibility notes.

Learn the three core product analytics SQL patterns — funnel analysis, retention (Day-1/7/30), and cohort analysis — using a standard events table, with common mistakes explained.

A practical guide to SQL string functions — CONCAT, SUBSTRING, TRIM, REPLACE, and REGEXP — with a real data-cleaning example and the CONCAT vs || NULL-handling difference.

Understand exactly how WHERE, GROUP BY, and HAVING execute in SQL, with the real logical execution order, common mistakes, and why filtering early with WHERE is faster.

A complete guide to SQL JOINs with practical examples, performance notes, and common mistakes. Covers INNER, LEFT, RIGHT, FULL OUTER, CROSS, self joins, and semi/anti-joins.
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.