MySQL : AVG of AVG impossible ?
- by Tristan
Hi,
I want to do an average : the problem is for 1 item i'm calculating the AVG of each elements (working) but as soon as i want the GLOBAL average the average of the elements (something and foo) it doesn't work.
I need to do that because i want to sort the result by the global average
SELECT AVG(AVG(something)+AVG(foo)) /2 as moy
.....
ORDER BY moy DESC
Thanks,