Suppose there is a rate sign and five columns in it. The first column stores the names, and the rest some numbers. What to indicate in ORDER BY in order to display in order those entries whose sum of these numbers is greater?
INSERT INTO `rating_uni` (`id`, `name`, `r1`, `r2`, `r3`, `r4`, `r5`) VALUES (47, 'Name1', 0, 2, 1, 1, 1), (48, 'Name2', 0, 2, 2, 1, 0), (49, 'Name3', 1, 0, 1, 1, 0), (50, 'Name4', 0, 0, 0, 0, 0), (51, 'Name5', 3, 0, 0, 0, 1), (52, 'Name6', 0, 0, 0, 1, 1), (46, 'Name7', 0, 0, 0, 0, 0), (53, 'Name8', 0, 0, 0, 0, 0), Here is an example: for id 47, the total is 0 + 2 + 1 + 1 + 1 = 5, for the id 48, the total is 0 + 2 + 2 + 1 + 0 = 5, for id 49, the total is 1 + 0 + 1 + 1 + 0 = 3. Sorting should occur on these sums.