SELECT SUM(quantity) FROM `ps_stock_available` WHERE (id_product = 8021) AND (id_product_attribute = 0) AND (id_shop = 1) AND (id_shop_group = 0)