MySQL Rating With Weight
问题 I want to create a rating with weight depending on number of votes. So, 1 voting with 5 can't be better than 4 votings with 4. I found this math form: bayesian = ( (avg_num_votes * avg_rating) + (this_num_votes * this_rating) ) / (avg_num_votes + this_num_votes) How can I make a MySQL SELECT to get the ID of the best rating image. I got a table for IMAGE, and a table for VOTING VOTING: id imageID totalVotes avgVote I think I got to do this with SELECT in SELECT, but how? 回答1: A first step is