MYSQL Order By Sum of Columns

Posted by djs22 on Stack Overflow See other posts from Stack Overflow or by djs22
Published on 2010-06-17T05:38:19Z Indexed on 2010/06/17 5:43 UTC
Read the original article Hit count: 218

Filed under:
|

Hi all,

Any idea on how to order the results of a MYSQL query by the sum of two columns rather than by a single column?

Select * FROM table ORDER BY (col1+col2) desc

I know that won't work., but I hope it conveys what I want to do fairly well.

Thanks!

© Stack Overflow or respective owner

Related posts about mysql-query

Related posts about order-by