--The difference between union and join
--Union/Union all adds rows from one table to another
Use OLAP
SELECT Date, Retailer_city, Order_method_type, Urgent
	       , Retailer_type, Product_code, Sale_price, Quantity_sold
FROM sales_2016
UNION --Add sales data from the sales_2017 table
SELECT Date, Retailer_city, Order_method_type, Urgent
	    , Retailer_type, Product_code, Sale_price, Quantity_sold
FROM sales_2017

--Joins adds columns from one table to another
SELECT s.Date,s.Retailer_city, s.Order_method_type, s.Urgent
	       ,s.Retailer_type, s.Product_code, s.Sale_price, s.Quantity_sold
		   ,p.product_line --include the product line from the products table
FROM sales_2016 as s JOIN products as p ON s.product_code = p.code

