Unanswered: Need help with sorting by MAX average!
Alright so I'm sure this is probably something really stupid I haven't thought about yet but what I'm trying to due is sort rows by the MAX AVG. Basically I've got a table of records that relate to photos. These photos are rated by visitors and given a value of 1-5. The table columns in question look like this:
So I thought something like this would work:
SELECT photo_id FROM table GROUP BY photo_id ORDER BY MAX(AVG(rating)) DESC