select time_by_day.the_year as c0, time_by_day.quarter as c1, product.product_name as c2, customer.customer_id as c3, customer.education as c4, 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 time_by_day.the_year = 1997 and time_by_day.quarter = 'Q1' 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, time_by_day.quarter, product.product_name, customer.customer_id, customer.education; |