title: Divide columns - oracle
body: <p><a href="https://i.stack.imgur.com/o2wFQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o2wFQ.png" alt="enter image description here"></a></p>
  
  <p>Hello/ I need divide this table </p>
  
  <p>I try use this but have bad result </p>
  
  <pre><code>SELECT MIN(y1),
         MAX(y1),
         MIN(redempamount1),
         MAX(redempamount1),
         MIN(f1),
         MIN(f2),
         MAX(f1),
         MAX(f2)
  FROM   (SELECT to_number(y1) y1,
                 redempamount1,
                 add_months('02.03.2018', 12 * y1 - 12) f1,
                 add_months('02.03.2018', 12 * y1) - 1 f2,
                 row_number() over(PARTITION BY ntl ORDER BY rownum DESC) grp
          FROM   (SELECT to_number(t.y1) y1,
                         redempamount1,
                         add_months('02.03.2018', 12 * y1 - 12) f1,
                         add_months('02.03.2018', 12 * y1) - 1 f2,
                         ntile(2) over(ORDER BY rownum DESC) ntl
                  FROM   inspolreport t))
  GROUP  BY grp;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/7Xohu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Xohu.png" alt="enter image description here"></a></p>
  
  <pre><code>Y1 REDEMPAMOUNT1 F1         F2
  -- ------------- ---------- ----------
   1             0 18.12.2008 17.12.2009
   2       3362.54 18.12.2009 17.12.2010
   3       6030.84 18.12.2010 17.12.2011
   4       8873.52 18.12.2011 17.12.2012
   5       11830.9 18.12.2012 17.12.2013
   6      15041.83 18.12.2013 17.12.2014
   7      18382.37 18.12.2014 17.12.2015
   8      21857.15 18.12.2015 17.12.2016
   9      25472.97 18.12.2016 17.12.2017
  10      27359.51 18.12.2017 17.12.2018
  11      31690.65 18.12.2018 17.12.2019
  12         36195 18.12.2019 17.12.2020
  13      40879.06 18.12.2020 17.12.2021
  14       45750.5 18.12.2021 17.12.2022
  15      53491.44 18.12.2022 17.12.2023
  </code></pre>
  
  <p>expected output</p>
  
  <pre><code>Y1 REDEMPAMOUNT1 F1         F2         Y2 REDEMPAMOUNT1 F3         F4
  -- ------------- ---------- ---------- -- ------------- ---------- ----------
   1             0 18.12.2008 17.12.2009  9      25472.97 18.12.2016 17.12.2017
   2       3362.54 18.12.2009 17.12.2010 10      27359.51 18.12.2017 17.12.2018
   3       6030.84 18.12.2010 17.12.2011 11      31690.65 18.12.2018 17.12.2019
   4       8873.52 18.12.2011 17.12.2012 12         36195 18.12.2019 17.12.2020
   5       11830.9 18.12.2012 17.12.2013 13      40879.06 18.12.2020 17.12.2021
   6      15041.83 18.12.2013 17.12.2014 14       45750.5 18.12.2021 17.12.2022
   7      18382.37 18.12.2014 17.12.2015 15      53491.44 18.12.2022 17.12.2023
   8      21857.15 18.12.2015 17.12.2016
  </code></pre>