d# JOIN
## Definition(s)
### Context:[[Nexus - Google Analytics Certificate Course#5.3 Google Analytics - 5 Analyze - Module 3 - Aggregate Data for Analysis Aggregate Data for Analysis|Google Analytics Certificate]]
#### Sub Context: [[SQL Function]]
>[! Definition]
>A SQL function that is used to combine rows from two or more tables based on a related
column
## Examples
```SQL
SELECT
-- table columns from tables are inserted here
table_name1.column_name
table_name2.column_name
FROM
table_name1
JOIN
table_name2
ON table_name1.column_name = table_name2.column_name
```
The above is an example of an [[INNER JOIN]] syntax.
## Related
[[INNER JOIN]]
[[LEFT JOIN]]
[[RIGHT JOIN]]
[[OUTER JOIN]]
## Resources
![[understanding joins.png]]
Image credit: Coursera/Google
### Online resources
- [W3 schools SQL JOINS](https://www.w3schools.com/sql/sql_join.asp)
- [Essential SQL; Join primer](https://www.essentialsql.com/introduction-database-joins/)
- [Visualize joins](https://dataschool.com/how-to-teach-people-sql/sql-join-types-explained-visually/)
- [Step-by-step joins](https://towardsdatascience.com/sql-join-8212e3eb9fde)
- [More on joins](https://www.dofactory.com/sql/join)
## Flashcards
The below code are generated for use with [Spaced Repetition plugin](https://github.com/st3v3nmw/obsidian-spaced-repetition/) [docs](https://www.stephenmwangi.com/obsidian-spaced-repetition/)
A SQL function that is used to combine rows from two or more tables based on a related
column @@@ [[JOIN]]
<!--SR:!2025-02-22,3,250!2000-01-01,1,250-->