select product_class.product_family as c0, product_class.product_department as c1, product_class.product_category as c2, product_class.product_subcategory as c3, product.brand_name as c4, sum(sales_fact_1997.store_sales) as m0 from product_class as product_class, product as product, sales_fact_1997 as sales_fact_1997 where sales_fact_1997.product_id = product.product_id and product.product_class_id = product_class.product_class_id and product_class.product_family = 'Drink' and product_class.product_department = 'Alcoholic Beverages' and product_class.product_category = 'Beer and Wine' and product_class.product_subcategory in ('Beer', 'Wine') and product.brand_name in ('Good', 'Pearl', 'Portsmouth', 'Top Measure', 'Walrus') group by product_class.product_family, product_class.product_department, product_class.product_category, product_class.product_subcategory, product.brand_name; |