Here is my problem. I need to order the same speakers in different ways in the same choice. Go first and then go down.
Example:
Table1
+--------+-----+
| Name | Age |
+--------+-----+
| Coa | 20 |
| Bami | 12 |
| Alice | 50 |
+--------+-----+
The results should be:
+------+-----+
| Age | Age |
+------+-----+
| 12 | 50 |
| 20 | 20 |
| 50 | 12 |
+------+-----+
I want the same column to order Ascendant first and then Descendant.
I'm trying to
Query
Select t1.age, t2.age
from table1 t1
inner join table1 t2
on t1.name=t2.name
order by t1.age asc, t2.age desc
But as a result, both columns are ordered in the same way.
Does anyone know how to solve this problem?
source
share