I have problem with sort/order by, not working like I need.
SELECT `proc` FROM `table` ORDER BY `proc` DESC;
Result:
80.0 proc
70.0 proc
60.0 proc
50.0 proc
40.0 proc
200.0 proc
20.0 proc
190.0 proc
180.0 proc
170.0 proc
160.0 proc
150.0 proc
140.0 proc
130.0 proc
120.0 proc
110.0 proc
100.0 proc
What I need is:
200.0 proc
190.0 proc
180.0 proc
170.0 proc
160.0 proc
150.0 proc
140.0 proc
130.0 proc
120.0 proc
110.0 proc
100.0 proc
90.0 proc
80.0 proc
70.0 proc
60.0 proc
50.0 proc
40.0 proc
20.0 proc
How to do it ?
It looks like “proc” is a string (
varcharfield), so it gets ordered lexically. If it is so, you can probably order it byPlease note that such queries will be very slow, and for any serious usage it’s better to use numeric columns for storing numeric data.