Skip to content
Advertisement

how to get the sql data in reverse order of rows

i have a source table

desired result

output—

i was trying something like this

is this is a simple way to write or any better ways to write ?

Advertisement

Answer

We can use CASE expressions to find each distinct source destination pair:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement