mercredi 16 décembre 2015

LEFT JOIN in SQLite dont work

I have problem with join 2 tables:

SELECT category.id, sum(price*quantity)
FROM category 
LEFT JOIN product 
ON product.categoryID_id = category.id 
GROUP BY category.id

when i execute this code in Microsoft SQL result is:

All categories with sum even dont have any products in product but if i execute this code in python project (using SQLite) result is:

Only categories with sum, if categories dont have any products i can`t see these categories.

How i can see categories without sum?

Aucun commentaire:

Enregistrer un commentaire