--select data
select * from sales4;


--Unpivot the quarter sales columns, Q1_sales through Q4_sales, to produce sales by year and quarter

select * from 
	(select f_yr, Q1_sales, Q2_sales, Q3_sales, Q4_sales from sales4) dt
	UNPIVOT (sales for f_qtr_sales in (Q1_sales, Q2_sales, Q3_sales, Q4_sales)
	) tmp
order by 1,2;