Oracle: How query get subtotal and total grand together?
<p>i'm use oracle, i want query get subtotal and total grand together?</p>

<p><strong>Example Data.</strong></p>

<pre><code>SDate      | BankCode | ERCODE | CURRENCY | Rate
21/08/2015 | 12       | AQER   | USD      | 10
21/08/2015 | 12       | AQER   | USD      | 12
21/08/2015 | 12       | BERT   | EUR      | 14
21/08/2015 | 12       | POE    | JPY      | 31
21/08/2015 | 9        | AQER   | USD      | 15
21/08/2015 | 9        | HUIO   | USD      | 08
01/09/2015 | 9        | AQER   | USD      | 45
01/09/2015 | 9        | AQER   | USD      | 11
01/09/2015 | 9        | JIOW   | EUR      | 47
</code></pre>

<p><strong>i need result.</strong></p>

<pre><code>SDate      | BankCode | ERCODE | CURRENCY | Rate | No.
21/08/2015 | 12       | AQER   | USD      | 10   | 1
21/08/2015 | 12       | AQER   | USD      | 12   | 
Sub Total  |          |        |          | 22   |                
21/08/2015 | 12       | BERT   | EUR      | 14   | 2
21/08/2015 | 12       | POE    | JPY      | 31   | 3
GrandTotal |          |        |          | 67   | 

21/08/2015 | 9        | AQER   | USD      | 15   | 1
21/08/2015 | 9        | HUIO   | USD      | 08   | 2
GrandTotal |          |        |          | 23   | 

01/09/2015 | 9        | AQER   | USD      | 45   | 1
01/09/2015 | 9        | AQER   | USD      | 11   |
Sub Total  |          |        |          | 56   |    
01/09/2015 | 9        | JIOW   | EUR      | 47   | 2
GrandTotal |          |        |          | 103  | 
</code></pre>

<p><strong>Data Relation:</strong>
SDATE > BANKCODE > CURRENCY > ERCODE</p>

<p>and insert No. column after new query.</p>

<p>How query get subtotal and total grand together?</p>

<p>Thanks advance. :)</p>