Complex SQL Query Breakdown Step By Step

 <https://www.youtube.com/watch?v=f1vuGPuug9s&ab_channel=DatabaseStar>
03:02

use the FROM clause to understand tables in the query

 04:60

LEFT JOIN (only join items into the union from the left table) uses a subquery where we can SELECT inside and the JOIN it on a field to the computed table

 08:50

any filters? HAVING is filtering where sum values != 0

 14:34

Run the main query in parts

Post Mortem

https://bram-adams.ghost.io/content/images/2023/01/Complex-SQL-Query-Breakdown-Step-By-Step-Screenshot-2023-01-09-17-42-25.png
Complex SQL Query Breakdown Step By Step Screenshot 2023-01-09 17-42-25.png
https://bram-adams.ghost.io/content/images/2023/01/Complex-SQL-Query-Breakdown-Step-By-Step-Screenshot-2023-01-09-17-46-07.png
Complex SQL Query Breakdown Step By Step Screenshot 2023-01-09 17-46-07.png
https://bram-adams.ghost.io/content/images/2023/01/LEFT-JOIN-Screenshot-2023-01-09-17-48-36.png
LEFT JOIN Screenshot 2023-01-09 17-48-36.png