I have a table called Product which display the data as below:
---------------------------------
l TYPE l PERIOD l BALANCE l
l Auto l 2015 l 5 l
l Car l 2015 l 2 l
l Bus l 2015 l 45 l
l Auto l 2016 l 2 l
l Car l 2016 l 6 l
l Bus l 2016 l 50 l
l Auto l 2017 l 12 l
l Car l 2017 l 16 l
l Bus l 2017 l 10 l
---------------------------------
I need to query the this table so that the result is based on the year similar to below:
---------------------------------------------------------
l TYPE l BALANCE 2015 l BALANCE 2016 l BALANCE 2017 l
l Auto l 5 l 2 l 12 l
l Car l 2 l 6 l 16 l
l Bus l 45 l 50 l 10 l
---------------------------------------------------------
I have tried different queries but no luck.
Your help will be very useful,
Thanks in Advance.