Lets say I have a table:
[tt]
id | name | count
-----------------
1 a 25
2 b 24
3 c 23
4 d 20
5 e 16
6 f 14
7 g 12
8 h 12
9 i 4
10 j 2
[/tt]
Is it possible, in one query, to order the TOP 5 counts in ASCENDING order by that same count? The result I'm looking for is:
[tt]
id | name | count
-----------------
5 e 16
4 d 20
3 c 23
2 b 24
1 a 25
[/tt]
I tried to use a count2 alias of count and then [tt]ORDER BY count DESC, count2 ASC[/tt], to no avail.
Thanks in advance!
[tt]
id | name | count
-----------------
1 a 25
2 b 24
3 c 23
4 d 20
5 e 16
6 f 14
7 g 12
8 h 12
9 i 4
10 j 2
[/tt]
Is it possible, in one query, to order the TOP 5 counts in ASCENDING order by that same count? The result I'm looking for is:
[tt]
id | name | count
-----------------
5 e 16
4 d 20
3 c 23
2 b 24
1 a 25
[/tt]
I tried to use a count2 alias of count and then [tt]ORDER BY count DESC, count2 ASC[/tt], to no avail.
Thanks in advance!