USE OLAP
--Adding simple measures
SELECT --dimensions
       order_method_type
	   ,retailer_type
	   
       --measures for quantity sold
       ,sum(quantity_sold) as number_sold
	   ,avg(quantity_sold) as average_sold
	   ,min(quantity_sold) as min_sold
	   ,max(quantity_sold)
	   ,count(quantity_sold) as number_of_sales 
FROM sales
GROUP BY order_method_type,retailer_type --always group by dimensions

SELECT --dimensions
       order_method_type
	   ,retailer_type 

       --measures for sale price
	   ,min(sale_price) as min_sale_price
	   ,max(sale_price) as max_sale_price
	   ,avg(sale_price) as average_sale_price

	   --measures for quantity sold
       ,sum(quantity_sold) as number_sold
	   ,count(quantity_sold) as number_of_sales 

FROM sales
GROUP BY order_method_type,retailer_type --always group by dimensions