I have 10 rows with a column ‘passion_level’ that has both negative and positive values:
-3 5 8 9 -11 0 3 1 10 -8
If I run the query SELECT * FROM table ORDER BY passion_level DESC I get the numbers ordered as you would expect, from high to low with the negative numbers at the bottom of the list. But how do we get mysql to order a column of signed integers disregarding the sign (treat negative numbers as positive numbers) so we get rows returned in this order:
-11 10 9 8 -8 5 -3 3 1 0
1 Answer