[snip]

SELECT sum(a), b, c
FROM table
WHERE statement
GROUP BY b, c
HAVING sum(a) > 0

The problem is that I was the results to be in descending order by
sum(a). I
know that GROUP BY works as an ORDER BY at the same time, but I cannot
use
the group function into the GROUP BY statement...!

What can I do?
[/snip]

SELECT sum(a) as a_total, b, c
FROM table
WHERE statement
GROUP BY b, c
ORDER BY a_total
HAVING sum(a) > 0

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to