title: Oracle pl/sql permutation and combination
body: <p>I am not sure what is the correct search term for this, please let me know if there's already an answer for this.
  eg:
  I have these data</p>
  
  <pre><code>A
  B
  C
  D
  E
  </code></pre>
  
  <p>What is the best way to calculate the addition of each possible combination? Such as:</p>
  
  <pre><code>A
  A+B
  A+C
  A+D
  A+E
  A+B+C
  A+B+D
  A+B+E
  A+C+D
  A+C+E
  A+C+D+E
  A+B+C+D
  A+B+C+E
  A+B+C+D+E
  B
  B+C
  B+D
  B+E
  B+C+D
  B+C+E
  B+C+D+E
  C
  C+D
  C+E
  ...
  The list goes on.......
  </code></pre>
  
  <p>Is there any way to achieve this?</p>
  
  <p>The 5 data are not fixed. I might have 10.. 20 or 50 or 1000 :(</p>
  
  <p>Thank you.</p>