select column_1, column_2, column_3 from test_table; A query that returns a table with 3 columns.
aaa 11 123 bbb 12 232 ccc 14 222 aaa 16 222 sss 19 333 bbb 19 331 aaa 20 999 It is necessary to display this table as follows.
aaa 11 123 16 222 20 999 bbb 12 232 19 331 ccc 14 222 sss 19 333 How can this be done ?. I guess it needs to be done through order by but somehow you need to get intermediate results.