Calculating multiple averages across different parts of the table?
问题 I have the following transactions table: customer_id purchase_date product category department quantity store_id 1 2020-10-01 Kit Kat Candy Food 2 store_A 1 2020-10-01 Snickers Candy Food 1 store_A 1 2020-10-01 Snickers Candy Food 1 store_A 2 2020-10-01 Snickers Candy Food 2 store_A 2 2020-10-01 Baguette Bread Food 5 store_A 2 2020-10-01 iPhone Cell phones Electronics 2 store_A 3 2020-10-01 Sony PS5 Games Electronics 1 store_A I would like to calculate the average number of products purchased