blob: 0a31c3e67bd52207e4a58da9060e5c076051e699 [file] [log] [blame]
select time_by_day.the_year as c0, product.product_name as c1, customer.customer_id as c2, sum(sales_fact_1997.unit_sales) as m0 from time_by_day as time_by_day, sales_fact_1997 as sales_fact_1997, product as product, customer as customer where sales_fact_1997.time_id = time_by_day.time_id and sales_fact_1997.product_id = product.product_id and product.product_name in ('BBB Best Pepper', 'Hermanos Garlic') and sales_fact_1997.customer_id = customer.customer_id and customer.customer_id in (558, 587, 697, 753, 760, 1048, 1097, 1154, 1474, 1491, 1567, 1666, 1676, 1690, 1743, 1808, 2441, 2587, 2764, 2846, 2921, 3124, 3620, 4066, 4606, 4985, 5167, 5608, 5782, 6806, 7250, 7514, 7536, 7702, 8177, 8403, 8731, 8814, 8902, 9273, 9469, 9481, 9534, 9642, 9851, 10144) group by time_by_day.the_year, product.product_name, customer.customer_id;