SQL joins reference for inner joins, left joins, right joins, full outer joins, cross joins, self joins, semi-joins, anti-joins, many-to-many joins, aggregation after joins, NULL handling, and join performance troubleshooting across PostgreSQL, MySQL, SQLite, SQL Server, and other SQL systems.
Category
SQL Joins Cheat Sheets
SQL join patterns, join types, set matching, anti-joins, and performance tuning across major relational databases.
Popular in SQL Joins
Quick picks to get you started.
SQL Join Patterns and Pitfalls
Common SQL join mistakes, reusable templates, and correctness rules for production queries.
Updated 3/28/2026
Join Performance, EXPLAIN, and Optimization
SQL join tuning with indexes, plan inspection, row reduction, and troubleshooting guidance.
Updated 3/28/2026
Aggregation After Joins and NULL Handling
Counting, summing, pre-aggregating, and handling NULLs correctly after one-to-many and outer joins.
Updated 3/28/2026
Semi-Joins and Anti-Joins
High-value EXISTS, IN, NOT EXISTS, and LEFT JOIN IS NULL patterns for membership and missing-row queries.
Updated 3/28/2026
Many-to-Many Joins and Bridge Tables
Many-to-many SQL join patterns with bridge tables, aggregation, filtering, and index guidance.
Updated 3/28/2026
Self Joins and Hierarchies
SQL self join examples for managers, duplicates, comparisons, and basic hierarchy modeling.
Updated 3/28/2026
All SQL Joins sheets
8 published sheets · sorted by recently updated.
SQL Join Patterns and Pitfalls
Common SQL join mistakes, reusable templates, and correctness rules for production queries.
Updated 3/28/2026
Join Performance, EXPLAIN, and Optimization
SQL join tuning with indexes, plan inspection, row reduction, and troubleshooting guidance.
Updated 3/28/2026
Aggregation After Joins and NULL Handling
Counting, summing, pre-aggregating, and handling NULLs correctly after one-to-many and outer joins.
Updated 3/28/2026
Semi-Joins and Anti-Joins
High-value EXISTS, IN, NOT EXISTS, and LEFT JOIN IS NULL patterns for membership and missing-row queries.
Updated 3/28/2026
Many-to-Many Joins and Bridge Tables
Many-to-many SQL join patterns with bridge tables, aggregation, filtering, and index guidance.
Updated 3/28/2026
Self Joins and Hierarchies
SQL self join examples for managers, duplicates, comparisons, and basic hierarchy modeling.
Updated 3/28/2026
INNER, LEFT, RIGHT, and FULL OUTER JOIN Patterns
Practical SQL patterns for inner, outer, and reconciliation-style joins, including full outer join emulation.
Updated 3/28/2026
SQL Join Basics and Join Types
Core SQL join types with practical examples, NULL behavior, and quick rules for correct join selection.
Updated 3/28/2026