title: SQL Get subtotal in each group
body: <p>Good Morning in my timezone</p>
  
  <p>My goal is :</p>
  
  <pre><code>TYPE |  CODE | PRICE | QUANTITY
  A       10      34       1
  A       11      20       2
  A       15      17       2
  A       Total   71       5
  B       13      14       1
  B       10      24       2
  B      Total    38       3
  </code></pre>
  
  <p>I am using Sybase ASE version 15.5 so there is not the ROLLUP or CUBE operators.
  Is the cursor the only way i got ?</p>
  
  <p>Thanks in advance
  Best Regards</p>