Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

order by

JellyMay 20 2024 — edited May 20 2024

WITH T AS(
SELECT 76.2 A,3.85 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.85 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.5 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.5 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.5 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.5 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.5 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.5 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.5 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.5 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.5 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.2 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.2 B FROM DUAL
UNION ALL
SELECT 76.2 A,3.2 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.2 B FROM DUAL
UNION ALL
SELECT 63.5 A,3.2 B FROM DUAL
UNION ALL
SELECT 50.8 A,3.2 B FROM DUAL)
SELECT * fROM T

I wish result order by B then A, A same then Cut the queue

A B

76.2 3.85
63.5 3.85
76.2 3.5
76.2 3.5
76.2 3.5
76.2 3.5
76.2 3.5

76.2 3.2
76.2 3.2
76.2 3.2

63.5 3.5
63.5 3.5
63.5 3.5
63.5 3.5

63.5 3.2
63.5 3.2
50.8 3.2

Comments
Post Details
Added on May 20 2024
3 comments
98 views