CREATE VIEW COUNT_PRODUCT_ORDERS 
  (Quantity, Product)
 AS
	SELECT oi.quantity AS quantity, p.product_name	
	FROM (SELECT sum(quantity) AS quantity, product_id FROM order_item GROUP BY product_id) oi 
	INNER JOIN product P 
	ON oi.product_id = p.id
	
	UNION 
	
	SELECT 0 AS quantity, p.product_name
	FROM product P 
	WHERE p.id NOT IN (SELECT DISTINCT product_id FROM order_item)
	
	ORDER BY quantity;
