Hi All
Here is the sample data from the view
Select
QTR,
vendor ,
vendor\_id,
amount,approved\_date
FROM RENEWALS\_V where rownum\<10

I use the below query to get subtotals for each quarter get the output
SELECT
case row\_number() over(PARTITION BY rv.QTR
ORDER BY rv.VENDOR
)
when 1 then rv.qtr end Quarter,
QTR,
vendor ,
(sum(rv.amount)) AS total
FROM RENEWALS\_V rv where
rv.QTR in (select q.QTR from quarters q where ( (trunc(q.qtr\_Start\_dt) between trunc(sysdate-455) and trunc(sysdate)))
OR sysdate between q.qtr\_Start\_dt and q.qtr\_end\_dt )
GROUP BY GROUPING SETS (( QTR,Vendor),(QTR) )
order by QTR Desc

I would like to get the subtotals labeled as subtotals.What changes should be made to the above query?

Thanks
Archana