SQL & Relational Databases
SQL & Relational Databases
Quick visual reference for relational database queries, join behaviors, set operations, and query structures.
SQL Relational Operations

Core SQL Patterns
Joins Summary
- INNER JOIN: Returns records that have matching values in both tables.
- LEFT (OUTER) JOIN: Returns all records from the left table, and matched records from the right table.
- RIGHT (OUTER) JOIN: Returns all records from the right table, and matched records from the left table.
- FULL (OUTER) JOIN: Returns all records when there is a match in either left or right table.
- CROSS JOIN: Produces the Cartesian product of rows from both tables.
Aggregation & Filtering
Remember the standard SQL clause evaluation order:
FROM&JOINWHERE(row-level filtering before grouping)GROUP BY(aggregations)HAVING(group-level filtering after aggregations)SELECT(projections and expressions)DISTINCTORDER BYLIMIT/OFFSET