Organizational Research By

Surprising Reserch Topic

how to order by a sum in mysql


how to order by a sum in mysql  using -'sql,mysql,sql-order-by'

I have a table: "ID name c_counts f_counts "

and I want to order all the record by sum(c_counts+f_counts)
but this doesn't work:

SELECT * FROM table ORDER BY sum(c_counts+f_counts) LIMIT 20;
    

asked Sep 24, 2015 by r3tt
0 votes
5 views



Related Hot Questions

3 Answers

0 votes
NULL
answered Sep 24, 2015 by amit.gupta
0 votes
NULL
answered Sep 24, 2015 by ukohale
0 votes
NULL
answered Sep 24, 2015 by ajit.chavhan

...