I use Oracle 10g and I query in Packages. How Pivot function sum() in Packages?

Sql Query.

```
WITH DATA_JOIN AS
(SELECT S.START_DATE_GMT,
S.NO_OF_CALL,
S.RATE,
T.TAX_RATE,
T.EFF_DATE,
T.EXP_DATE,
S.COMPANY_CODE,
T.COMPANY_CODE CC,
S.SUB_EVENT_TYPE_ID,
S.event_type_id,
S.PMN_ORIGIN,
S.PMN_ROUTE
FROM IR_V_ISM_RATE_BY_TRANS S
LEFT JOIN IR_PMN_TAX T
ON S.COMPANY_CODE = T.COMPANY_CODE
AND S.PMN_ROUTE = T.PMN_CODE
WHERE T.TAX_TYPE = '01'
AND S.START_DATE_GMT <= T.EFF_DATE
AND S.START_DATE_GMT >= T.EXP_DATE
OR T.EXP_DATE IS NULL
ORDER BY COMPANY_CODE),
TEMP_A AS
(SELECT START_DATE_GMT,
SUM(NO_OF_CALL) AS TOTAL_TRANSACTION,
((SUM(NO_OF_CALL)) * RATE) AS TOTAL_AMOUNT,
((((SUM(NO_OF_CALL)) * RATE) * TAX_RATE) / 100) AS TOTAL_VAT,
RATE
FROM DATA_JOIN
WHERE COMPANY_CODE = 'RIT'
AND SUB_EVENT_TYPE_ID = '2'
AND PMN_ROUTE = 'C2'
AND EVENT_TYPE_ID = '01'
AND TO_CHAR(START_DATE_GMT, 'MM/YYYY') <= '01/2015'
AND (TO_CHAR(START_DATE_GMT, 'MM/YYYY') >= '01/2015' OR START_DATE_GMT IS NULL)
GROUP BY START_DATE_GMT, SUB_EVENT_TYPE_ID, RATE, TAX_RATE
ORDER BY START_DATE_GMT)
/* Result */
SELECT
SUM(TOTAL_AMOUNT)AS EXCLUDE_VAT,
SUM(TOTAL_VAT) AS SUM_VAT,
SUM(SUM(TOTAL_AMOUNT)+SUM(TOTAL_VAT)) AS TOTAL_INCLUDE
FROM TEMP_A
GROUP BY TOTAL_AMOUNT,TOTAL_VAT;
```

Result SQL Query

```
EXCLUDE_VAT | SUM_VAT | TOTAL_INCLUDE
5.50 | 0.30 | 5.80
```

**I need Result Pivot**

```
Calculate Vat | Total Amount
----------------------------------
EXCLUDE_VAT | 5.50
SUM_VAT | 0.30
TOTAL_INCLUDE | 5.80
```

How Pivot Function Sum() in Packages?