Title: Free SQL Articles & Tutorials — Query Patterns & Tips | SqlInt
Open Graph Title: Free SQL Articles & Tutorials — Query Patterns & Tips
X Title: Free SQL Articles & Tutorials — Query Patterns & Tips
Description: Read free SQL articles and tutorials — query patterns, window functions, performance, interview prep, and best practices with examples and PDFs.
Open Graph Description: Free SQL articles and tutorials — query patterns, window functions, performance, interview prep, and best practices with examples plus free PDF downloads.
X Description: Free SQL articles and tutorials — query patterns, window functions, performance, interview prep, and best practices.
Keywords:
Opengraph URL: https://sqlint.com/articles
Domain: sqlint.com
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://sqlint.com/#organization","name":"SqlInt","url":"https://sqlint.com","logo":"https://sqlint.com/og-image.jpg","email":"support.sqlint@gmail.com","description":"SqlInt is a browser-based SQL practice and interview-preparation platform that also provides free client-side SQL tools for developers.","disambiguatingDescription":"SqlInt (sqlint.com) is a browser-based SQL practice and interview-preparation website with free client-side SQL tools - a web platform, not a command-line utility.","contactPoint":{"@type":"ContactPoint","contactType":"customer support","email":"support.sqlint@gmail.com","availableLanguage":["en"]},"subjectOf":[{"@type":"WebPage","url":"https://sqlint.com/about","name":"About SqlInt"}],"sameAs":[]},{"@type":"WebSite","@id":"https://sqlint.com/#website","url":"https://sqlint.com","name":"SqlInt","description":"SqlInt is a browser-based SQL practice and interview-preparation platform that also provides free client-side SQL tools for developers.","publisher":{"@id":"https://sqlint.com/#organization"}}]}
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What SQL topics do the articles cover?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Are the SQL articles free?","acceptedAnswer":{"@type":"Answer","text":"Yes. All published articles on SqlInt are free to read with no signup required, and most include a free PDF download."}},{"@type":"Question","name":"Can I download articles as PDF?","acceptedAnswer":{"@type":"Answer","text":"Yes. Every article page has a Download PDF button that generates a printable PDF with working links — including the free SQL cheat sheet."}},{"@type":"Question","name":"How often are new articles published?","acceptedAnswer":{"@type":"Answer","text":"New tutorials and guides are added regularly. Subscribe via the RSS feed at sqlint.com/rss.xml to get new articles as they publish."}},{"@type":"Question","name":"Where should beginners start?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://sqlint.com"},{"@type":"ListItem","position":2,"name":"SQL Articles","item":"https://sqlint.com/articles"}]}
{"@context":"https://schema.org","@type":"ItemList","name":"SQL Articles & Tutorials","description":"Free SQL articles and tutorials — query patterns, window functions, performance, interview prep, and best practices with examples and PDFs.","numberOfItems":41,"url":"https://sqlint.com/articles","itemListElement":[{"@type":"ListItem","position":1,"item":{"@type":"BlogPosting","headline":"Recursive CTEs in SQL: Org Charts, BOMs, Date Spines","url":"https://sqlint.com/articles/recursive-ctes-explained","image":["/og-image.jpg"],"description":"Learn recursive CTEs from the ground up — anchor and recursive members, org chart traversal, bill-of-materials explosions, date spine generation, and cycle prevention.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-03T10:00:00+00:00"}},{"@type":"ListItem","position":2,"item":{"@type":"BlogPosting","headline":"Normalization vs Denormalization in SQL: A Deep Dive","url":"https://sqlint.com/articles/normalization-vs-denormalization","image":["/og-image.jpg"],"description":"A deep dive into 1NF/2NF/3NF with real update/insert/delete anomalies, plus when and how to denormalize using duplicated columns, materialized views, and star schemas.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-05T12:00:00+00:00"}},{"@type":"ListItem","position":3,"item":{"@type":"BlogPosting","headline":"Product Analytics SQL: Funnels, Retention, and Cohorts","url":"https://sqlint.com/articles/product-analytics-sql-questions","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-05T10:00:00+00:00"}},{"@type":"ListItem","position":4,"item":{"@type":"BlogPosting","headline":"User Retention SQL Interview Question: Month-1 Retention","url":"https://sqlint.com/articles/user-retention-sql-interview-question","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-09-08T12:05:00+00:00"}},{"@type":"ListItem","position":5,"item":{"@type":"BlogPosting","headline":"SQL Window Functions: The Complete Guide","url":"https://sqlint.com/articles/sql-window-functions-complete-guide","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-03T09:00:00+00:00"}},{"@type":"ListItem","position":6,"item":{"@type":"BlogPosting","headline":"Date and Time Functions in SQL Compared","url":"https://sqlint.com/articles/date-and-time-functions-in-sql","image":["/og-image.jpg"],"description":"A side-by-side guide to SQL date and time functions across PostgreSQL, MySQL, and SQL Server — DATE_TRUNC, DATEADD, EXTRACT, and the timezone pitfalls that cause bugs.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T10:00:00+00:00"}},{"@type":"ListItem","position":7,"item":{"@type":"BlogPosting","headline":"SQL Query Optimization: 10 Proven Techniques","url":"https://sqlint.com/articles/sql-query-optimization-techniques","image":["/og-image.jpg"],"description":"Master SQL query optimization with 10 proven techniques, from indexing and execution plans to sargability and keyset pagination. Includes a practical optimization checklist and FAQ.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-01T10:00:00+00:00"}},{"@type":"ListItem","position":8,"item":{"@type":"BlogPosting","headline":"SQL Self Joins: Employee-Manager Hierarchical Data","url":"https://sqlint.com/articles/sql-self-joins-employee-manager-hierarchical-data","image":["/og-image.jpg"],"description":"Learn how self joins work with employee-manager hierarchies, org charts, and recursive CTEs, plus common mistakes and real interview questions on this classic SQL pattern.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-02T10:00:00+00:00"}},{"@type":"ListItem","position":9,"item":{"@type":"BlogPosting","headline":"Running Totals and Moving Averages in SQL","url":"https://sqlint.com/articles/running-totals-and-moving-averages-in-sql","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-03T11:00:00+00:00"}},{"@type":"ListItem","position":10,"item":{"@type":"BlogPosting","headline":"Top N Per Group in SQL: Every Method Compared","url":"https://sqlint.com/articles/top-n-per-group-in-sql","image":["/og-image.jpg"],"description":"Learn every way to solve top N per group in SQL — ROW_NUMBER, RANK, DENSE_RANK, correlated subqueries, and LATERAL/CROSS APPLY — with performance tradeoffs explained.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-03T12:00:00+00:00"}},{"@type":"ListItem","position":11,"item":{"@type":"BlogPosting","headline":"Transactions and ACID Properties in SQL Explained","url":"https://sqlint.com/articles/transactions-and-acid-properties-explained","image":["/og-image.jpg"],"description":"A deep dive into SQL transactions and ACID properties, isolation levels and the phenomena they prevent, pessimistic vs optimistic locking, and deadlock prevention.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-05T13:00:00+00:00"}},{"@type":"ListItem","position":12,"item":{"@type":"BlogPosting","headline":"CHAR vs VARCHAR vs TEXT in SQL: What's the Difference?","url":"https://sqlint.com/articles/char-vs-varchar-vs-text","image":["/og-image.jpg"],"description":"Understand the real difference between CHAR, VARCHAR, and TEXT in SQL — storage mechanics, performance across PostgreSQL/MySQL/SQL Server, and when to use each type.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-04T13:00:00+00:00"}},{"@type":"ListItem","position":13,"item":{"@type":"BlogPosting","headline":"The Ultimate SQL Cheat Sheet","url":"https://sqlint.com/articles/the-ultimate-sql-cheat-sheet","image":["/og-image.jpg"],"description":"A single-page SQL reference covering JOINs, window functions, CTEs, NULL handling, CASE WHEN, string/date functions, constraints, common query patterns, and more.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T18:00:00+00:00"}},{"@type":"ListItem","position":14,"item":{"@type":"BlogPosting","headline":"GROUP BY vs HAVING vs WHERE: The Complete Guide","url":"https://sqlint.com/articles/group-by-vs-having-vs-where","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-04T10:00:00+00:00"}},{"@type":"ListItem","position":15,"item":{"@type":"BlogPosting","headline":"Market Basket Analysis SQL Interview Explained","url":"https://sqlint.com/articles/frequently-bought-together-sql-interview-question","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-09-08T12:15:00+00:00"}},{"@type":"ListItem","position":16,"item":{"@type":"BlogPosting","headline":"SQL Constraints Explained: PRIMARY KEY, FOREIGN KEY, UNIQUE","url":"https://sqlint.com/articles/sql-constraints-explained","image":["/og-image.jpg"],"description":"A complete guide to SQL constraints — PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL, and DEFAULT — with ON DELETE CASCADE behavior and how to add constraints safely.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-04T12:00:00+00:00"}},{"@type":"ListItem","position":17,"item":{"@type":"BlogPosting","headline":"SQL Data Types Cheat Sheet: PostgreSQL, MySQL, SQL Server","url":"https://sqlint.com/articles/sql-data-types-cheat-sheet","image":["/og-image.jpg"],"description":"A practical SQL data types reference covering numeric, string, date/time, boolean, and JSON types across PostgreSQL, MySQL, and SQL Server, with a type-selection checklist.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-04T11:00:00+00:00"}},{"@type":"ListItem","position":18,"item":{"@type":"BlogPosting","headline":"The LIKE Operator in SQL: Wildcards, Performance, and Alternatives","url":"https://sqlint.com/articles/the-like-operator-in-sql","image":["/og-image.jpg"],"description":"Learn the SQL LIKE operator in depth — % and _ wildcards, case sensitivity across databases, escaping literal characters, and why leading wildcards silently disable indexes.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-07T09:00:00+00:00"}},{"@type":"ListItem","position":19,"item":{"@type":"BlogPosting","headline":"NULL Handling in SQL: COALESCE, NULLIF, IS NULL","url":"https://sqlint.com/articles/null-handling-in-sql","image":["/og-image.jpg"],"description":"Understand SQL three-valued logic and NULL handling in depth — COALESCE, NULLIF, IS NULL, NULLs in joins and aggregates, and the dangerous NOT IN + NULL trap.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T11:00:00+00:00"}},{"@type":"ListItem","position":20,"item":{"@type":"BlogPosting","headline":"SQL vs NoSQL: When to Use Which","url":"https://sqlint.com/articles/sql-vs-nosql-when-to-use-which","image":["/og-image.jpg"],"description":"A practical guide to choosing between SQL and NoSQL — document, key-value, column-family, and graph databases compared, plus polyglot persistence and common anti-patterns.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-05T14:00:00+00:00"}},{"@type":"ListItem","position":21,"item":{"@type":"BlogPosting","headline":"A/B Test Analysis with SQL","url":"https://sqlint.com/articles/ab-test-analysis-with-sql","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T14:00:00+00:00"}},{"@type":"ListItem","position":22,"item":{"@type":"BlogPosting","headline":"The Gaps and Islands Problem in SQL: A Complete Guide","url":"https://sqlint.com/articles/sql-gaps-and-islands-problem","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-02T09:00:00+00:00"}},{"@type":"ListItem","position":23,"item":{"@type":"BlogPosting","headline":"Year-over-Year Growth SQL Interview Walkthrough","url":"https://sqlint.com/articles/year-over-year-growth-sql-interview-question","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-09-08T12:10:00+00:00"}},{"@type":"ListItem","position":24,"item":{"@type":"BlogPosting","headline":"Top 20 SQL Interview Questions and Answers for 2026","url":"https://sqlint.com/articles/common-sql-interview-questions-and-answers","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-01T14:00:00+00:00"}},{"@type":"ListItem","position":25,"item":{"@type":"BlogPosting","headline":"FAANG SQL Interview Questions: A Pattern-Based Guide","url":"https://sqlint.com/articles/faang-sql-interview-questions-pattern-guide","image":["/og-image.jpg"],"description":"Big tech SQL interviews draw from six recurring patterns, not company-specific question banks. Learn to recognize ranking, funnels, streaks, hierarchies, dedup, and schema design questions.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-05T09:00:00+00:00"}},{"@type":"ListItem","position":26,"item":{"@type":"BlogPosting","headline":"CASE WHEN in SQL: Beyond the Basics","url":"https://sqlint.com/articles/case-when-in-sql-beyond-the-basics","image":["/og-image.jpg"],"description":"Go beyond basic CASE WHEN syntax — conditional aggregation, custom ORDER BY logic, NULL-safe bucketing, and the equivalence between CASE, COALESCE, and NULLIF.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T12:00:00+00:00"}},{"@type":"ListItem","position":27,"item":{"@type":"BlogPosting","headline":"Idempotent SQL: Writing Safe, Re-runnable Scripts","url":"https://sqlint.com/articles/idempotent-sql-writing-safe-rerunnable-scripts","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T16:00:00+00:00"}},{"@type":"ListItem","position":28,"item":{"@type":"BlogPosting","headline":"SQL JOINs Explained: INNER, LEFT, RIGHT, FULL, and CROSS","url":"https://sqlint.com/articles/sql-joins-explained-with-examples","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-01T12:00:00+00:00"}},{"@type":"ListItem","position":29,"item":{"@type":"BlogPosting","headline":"SQL Interview Situational Questions: Part 2","url":"https://sqlint.com/articles/sql-interview-situational-questions-part-2","image":["/og-image.jpg"],"description":"Six more SQL interview situational scenarios — deadlocks, stakeholder pushback, messy upstream data, zero-downtime migrations, security concerns, and conflicting metrics.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-09T09:00:00+00:00"}},{"@type":"ListItem","position":30,"item":{"@type":"BlogPosting","headline":"Nth Highest Salary in SQL: Every Method Explained","url":"https://sqlint.com/articles/nth-highest-salary-sql-guide","image":["/og-image.jpg"],"description":"The definitive guide to finding the Nth highest salary in SQL — OFFSET/LIMIT, correlated subqueries, and DENSE_RANK, with correct tie-handling and top-N-per-group variants.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-02T13:00:00+00:00"}},{"@type":"ListItem","position":31,"item":{"@type":"BlogPosting","headline":"SQL Interview Situational Questions: Part 1","url":"https://sqlint.com/articles/sql-interview-situational-questions-and-answers","image":["/og-image.jpg"],"description":"A framework and worked examples for SQL interview situational questions — debugging production incidents, handling mistakes, ambiguous requirements, and data discrepancies.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-08T09:00:00+00:00"}},{"@type":"ListItem","position":32,"item":{"@type":"BlogPosting","headline":"SQL Interview Questions: \"What's Wrong With This Query?\" Explained","url":"https://sqlint.com/articles/sql-whats-wrong-with-this-query-interview-questions","image":["/og-image.jpg"],"description":"Twelve real buggy SQL queries explained in depth — the NOT IN NULL trap, LEFT JOIN filter placement, missing PARTITION BY, non-sargable dates, and more, with fixes and reasoning.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-10T09:00:00+00:00"}},{"@type":"ListItem","position":33,"item":{"@type":"BlogPosting","headline":"CTE vs Subquery vs Temp Table vs View: When to Use Each","url":"https://sqlint.com/articles/cte-vs-subquery-vs-temp-table-vs-view","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T13:00:00+00:00"}},{"@type":"ListItem","position":34,"item":{"@type":"BlogPosting","headline":"String Functions in SQL: A Practical Guide","url":"https://sqlint.com/articles/string-functions-in-sql","image":["/og-image.jpg"],"description":"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.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T09:00:00+00:00"}},{"@type":"ListItem","position":35,"item":{"@type":"BlogPosting","headline":"SQL Window Functions: Rolling Averages Interview","url":"https://sqlint.com/articles/window-functions-sql-interview-question","image":["/og-image.jpg"],"description":"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 ","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-09-08T12:00:00+00:00"}},{"@type":"ListItem","position":36,"item":{"@type":"BlogPosting","headline":"RFM Analysis and Customer Segmentation in SQL","url":"https://sqlint.com/articles/rfm-analysis-and-customer-segmentation-in-sql","image":["/og-image.jpg"],"description":"Learn to build Recency, Frequency, Monetary (RFM) customer segmentation in SQL using NTILE, including the recency-inversion gotcha and segment-level reporting.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T15:00:00+00:00"}},{"@type":"ListItem","position":37,"item":{"@type":"BlogPosting","headline":"SQL Indexes Explained: B-Trees, Composite, Covering","url":"https://sqlint.com/articles/sql-indexes-explained","image":["/og-image.jpg"],"description":"A deep dive into how SQL indexes actually work — B-tree internals, composite index column order, covering indexes, partial indexes, and the write-performance tradeoff.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-05T11:00:00+00:00"}},{"@type":"ListItem","position":38,"item":{"@type":"BlogPosting","headline":"SQL Injection: How It Works and How to Prevent It","url":"https://sqlint.com/articles/sql-injection-how-it-works-and-how-to-prevent-it","image":["/og-image.jpg"],"description":"Learn how SQL injection attacks actually work — authentication bypass, UNION-based data exfiltration — and how parameterized queries prevent them structurally.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-06T17:00:00+00:00"}},{"@type":"ListItem","position":39,"item":{"@type":"BlogPosting","headline":"Find Duplicate Rows in SQL: 5 Proven Ways","url":"https://sqlint.com/articles/find-duplicate-rows-in-sql-5-ways","image":["/og-image.jpg"],"description":"Five proven ways to find duplicate rows in SQL — GROUP BY, self joins, window functions, EXISTS, and COUNT() OVER — plus how to safely delete duplicates and prevent them.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-02T11:00:00+00:00"}},{"@type":"ListItem","position":40,"item":{"@type":"BlogPosting","headline":"SQL Subqueries Explained: Correlated vs Non-Correlated","url":"https://sqlint.com/articles/sql-subqueries-explained","image":["/og-image.jpg"],"description":"Learn SQL subqueries from the ground up — correlated vs non-correlated, where subqueries can appear, and when to use a subquery vs a JOIN vs EXISTS, with the NOT IN NULL trap explained.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-04T09:00:00+00:00"}},{"@type":"ListItem","position":41,"item":{"@type":"BlogPosting","headline":"Pivot and Unpivot Data in SQL: A Practical Guide","url":"https://sqlint.com/articles/pivot-and-unpivot-data-in-sql","image":["/og-image.jpg"],"description":"Learn how to pivot and unpivot data in SQL using CASE, FILTER, and PIVOT/UNPIVOT operators, plus dynamic pivoting and when to reshape data in SQL vs. the application layer.","author":{"@type":"Person","name":"SqlInt team","url":"https://sqlint.com/authors/sqlint-team"},"datePublished":"2026-07-02T12:00:00+00:00"}}]}
| apple-mobile-web-app-capable | yes |
| theme-color | #0f172a |
| color-scheme | light dark |
| mobile-web-app-capable | yes |
| apple-mobile-web-app-title | SqlInt |
| apple-mobile-web-app-status-bar-style | default |
| og:site_name | SqlInt |
| og:image | https://sqlint.com/content-og.jpg |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:image:alt | SqlInt SQL articles and tutorials |
| og:type | website |
| twitter:card | summary_large_image |
| twitter:image | https://sqlint.com/content-og.jpg |
Links:
| SqlInt | https://sqlint.com/ |
| Learn SQL | https://sqlint.com/learn-sql |
| SQL Playground | https://sqlint.com/sql-practice |
| Interview Practice | https://sqlint.com/questions |
| Puzzleshot | https://sqlint.com/sql-puzzles |
| Articlespdf | https://sqlint.com/articles |
| Case Studies | https://sqlint.com/case-studies |
| Share feedback → | https://sqlint.com/contact-us |
| Share feedback → | https://sqlint.com/contact-us |
| View packs → | https://sqlint.com/packs |
| View packs → | https://sqlint.com/packs |
| Home | https://sqlint.com/ |
| Practice | https://sqlint.com/questions |
| Puzzles | https://sqlint.com/sql-puzzles |
| Learn | https://sqlint.com/learn-sql |
| SqlInt | https://sqlint.com/ |
| Learn SQL | https://sqlint.com/learn-sql |
| SQL Playground | https://sqlint.com/sql-practice |
| Interview Practice | https://sqlint.com/questions |
| Puzzleshot | https://sqlint.com/sql-puzzles |
| Articlespdf | https://sqlint.com/articles |
| Case Studies | https://sqlint.com/case-studies |
| Share feedback → | https://sqlint.com/contact-us |
| Share feedback → | https://sqlint.com/contact-us |
| View packs → | https://sqlint.com/packs |
| View packs → | https://sqlint.com/packs |
| Read Latest | https://sqlint.com/articles#latest-articles |
| Practice SQL | https://sqlint.com/questions |
| Window Functions & CTEs★ FeaturedRecursive CTEs in SQL: Org Charts, BOMs, Date SpinesLearn recursive CTEs from the ground up — anchor and recursive members, org chart traversal, bill-of-materials explosions, date spine generation, and cycle prevention.SSqlInt team·Jul 3, 2026·7 min readRead → | https://sqlint.com/articles/recursive-ctes-explained |
| Database Internals7 min readNormalization vs Denormalization in SQL: A Deep DiveA deep dive into 1NF/2NF/3NF with real update/insert/delete anomalies, plus when and how to denormalize using duplicated columns, materialized views, and star schemas.SSqlInt team·Jul 5, 2026·7 min read→ | https://sqlint.com/articles/normalization-vs-denormalization |
| Product Analytics6 min readProduct Analytics SQL: Funnels, Retention, and CohortsLearn 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.SSqlInt team·Jul 5, 2026·6 min read→ | https://sqlint.com/articles/product-analytics-sql-questions |
| Interview Questions4 min readUser Retention SQL Interview Question: Month-1 RetentionRetention 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.SSqlInt team·Sep 8, 2026·4 min read→ | https://sqlint.com/articles/user-retention-sql-interview-question |
| Window Functions & CTEs7 min readSQL Window Functions: The Complete GuideA 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.SSqlInt team·Jul 3, 2026·7 min read→ | https://sqlint.com/articles/sql-window-functions-complete-guide |
| Fundamentals6 min readDate and Time Functions in SQL ComparedA side-by-side guide to SQL date and time functions across PostgreSQL, MySQL, and SQL Server — DATE_TRUNC, DATEADD, EXTRACT, and the timezone pitfalls that cause bugs.SSqlInt team·Jul 6, 2026·6 min read→ | https://sqlint.com/articles/date-and-time-functions-in-sql |
| Performance10 min readSQL Query Optimization: 10 Proven TechniquesMaster SQL query optimization with 10 proven techniques, from indexing and execution plans to sargability and keyset pagination. Includes a practical optimization checklist and FAQ.SSqlInt team·Jul 1, 2026·10 min read→ | https://sqlint.com/articles/sql-query-optimization-techniques |
| Query Patterns7 min readSQL Self Joins: Employee-Manager Hierarchical DataLearn how self joins work with employee-manager hierarchies, org charts, and recursive CTEs, plus common mistakes and real interview questions on this classic SQL pattern.SSqlInt team·Jul 2, 2026·7 min read→ | https://sqlint.com/articles/sql-self-joins-employee-manager-hierarchical-data |
| Window Functions & CTEs6 min readRunning Totals and Moving Averages in SQLLearn 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.SSqlInt team·Jul 3, 2026·6 min read→ | https://sqlint.com/articles/running-totals-and-moving-averages-in-sql |
| Window Functions & CTEs6 min readTop N Per Group in SQL: Every Method ComparedLearn every way to solve top N per group in SQL — ROW_NUMBER, RANK, DENSE_RANK, correlated subqueries, and LATERAL/CROSS APPLY — with performance tradeoffs explained.SSqlInt team·Jul 3, 2026·6 min read→ | https://sqlint.com/articles/top-n-per-group-in-sql |
Viewport: width=device-width, initial-scale=1
Robots: index, follow