Want to sort the columns while using GROUP BY ROLLUP.
Want to order the below query using by "News' column in descending order and "Email address" column in Ascending order.
Note: Sorting should not bring Total value to top. It is happening now.
{code}
SELECT decode(grouping(NVL(Client, 'NA')),1, 'Totals', NVL(Client, 'NA')) "Email (Login ID)",
Location "Location",
SUM(News) "News",
SUM(Website) "Website",
FROM VW_FX_USERDATA
GROUP BY ROLLUP (((NVL(Client, 'NA')),Location,1, 'Totals', NVL(Client, 'NA')))
{code}
PLease let me know if you need any details.
Edited by: Nagaraja Akkivalli on Sep 23, 2011 4:04 PM