Hello,
Lets if i can explain this well (sorry for bad english!)
I have two differents tables on my db "Mixtapes" and "Vote" and i want to order them in DESC order by the SUM of all rate values that belong to a specific mixtape.
Mixtapes:
id
name
status
(etc)
Vote
id_mixtape // id_mixtape = id in Mixtapes table
rate
This is the query that im using but its not listing in Desc order, dont know why:
"SELECT id,name FROM mixtape WHERE status=1 AND id IN(SELECT id_mixtape FROM vote GROUP BY id_mixtape ORDER BY SUM(rate) DESC) LIMIT 12"