SQLite Forum

LEFT AND RIGHT OUTER JOINS problem
Login
I am trying to display the total quantity sold and total sales for all of the sellers and the products even when they have not sold any of the products. 
I know that I have to use LEFT OUTER or RIGHT OUTER JOIN to join the tables together with NULL values. 

SELECT se.seller_account_ref, se.seller_name, pro.product_code, pro.product_description, o.quantity AS [Total quantity sold], SUM(o.quantity)*o.price

FROM sellers se

INNER JOIN product_sellers pr ON se.seller_id = pr.seller_id

LEFT OUTER JOIN ordered_products o 
ON pr.seller_id = o.seller_id
AND pr.product_id = o.product_id

LEFT OUTER JOIN products pro ON pr.product_id = pro.product_id

Even if I use left outer join I still have just 1 result for the query. Can You help me with what I am doing wrong, I think I don't understand the idea of the outer joins.

Thank You in advance guys