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!

Order by two columns

Khalil DahhamApr 12 2019 — edited Apr 12 2019

Hello,

I have the following table:

Col1Col2
1A
2B
3C
4A
5B
6C

I want it ordered as follows:

Col1Col2
6C
3C
5B
2B
4A
1A

So what I want is to sort by Col1 descending, but with Col2 values grouped together. How to do this in SQL?

This post has been answered by Mustafa KALAYCI on Apr 12 2019
Jump to Answer
Comments
Post Details
Added on Apr 12 2019
4 comments
1,287 views