3 Replies Latest reply on Dec 21, 2018 11:38 AM by Lothar Flatz

    How to convert rows into columns with the dynamically in Oracle?

    3537132

      I need to convert row's into columns but year will be keep on changing, so that need to required  dynamic query. Could you please help here.

      Here we are calculating each 12 rows sum.

       

      Col1col2
      2015100
      2016120
      2017120
      2018110
      201590
      201680
      201770
      201820

       

      Output:  

      1st year(2015)2nd year(2016)3rd year(2017)4th Year(2018)
      100120120110
      90807020