Please enable JavaScript.
Coggle requires JavaScript to display documents.
Multiple Table Query Tree - Coggle Diagram
Multiple Table Query Tree
Filter Cartesian Products
Combination of all data from multiple table
Alternative Method
Pure WHERE
FROM...JOIN...ON...
FROM table1 alias1 JOIN table2 alias2 ON relationship
relationship is based on primary key and foreign key
Primary Key
Unique, not NULL, cannot duplicate
E.g. id
Foreign Key
PK from other table, can be NULL
Good Habit: Put at last row of table
Multiple Joins
Table joining order doesn't matter
Solve Indirect Linking (Needs >2 tables)
Self Joins
Same table joins itself, to find something that is under something
Additional Conditions
WHERE, LIKE, BETWEEN, AND, OR, ...
Non-Equal Joins
Find something that is under a range
Use BETWEEN after ON