I work on the contest website, where there are two types of users, ordinary site participants and judges. Everyone can use the drag and drop tool to order entries in a particular contest in the order in which they choose. When they are done, the corresponding login identifiers will be tied to the ranking, which can then be used to determine which entry in the contest received the highest average score. The winner will actually be determined by averaging the average values ββfor each group.
I hope that in fact I get a table indicating EVERY record in a particular competition with a heading, and then I show 3 values, avg_normal for this record, avg_judge for this record, and then these two values ββare added together and divided by two, therefore avg_normal and avg_judge each account account for 50% of avg_all. Finally, sort the table by avg_all.
avg_all = ((avg_normal + avg_judge) / 2)
They order entry_ids 1, 2, 3, 4, 5 in order. The ranking value starts from zero like this:
entry_id, entry_ranking, author_id 1, 0, 1 2, 1, 1 3, 2, 1 4, 3, 1 5, 4, 1
I hope to determine the average values ββon a scale from 1 to 100, so the input rating is 0 = 100 points, 1 = 90, 2 = 80, 3 = 70 and something higher than 4 = 5 points
Each user joins a group in a different table, so they are either a regular user or a judge
I want to write a query that finds
1.) Average user rating NORMAL
2.) Average JUDGE user rating
3.) The average of NORMAL and JUDGE SCORE.
Thus, average average user = 93.3333, average judge = 70, total average = 81.66665
Thanks to the answers below, both requests work like a champion.