Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Want to sort the columns while using GROUP BY ROLLUP.

Nagaraja AkkivalliSep 23 2011 — edited Sep 23 2011
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
This post has been answered by AndreyN on Sep 23 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2011
Added on Sep 23 2011
9 comments
492 views