Get sum of multiple average grouped by specific column
SELECT SUM(avg1) FROM (SELECT user_id, AVG(score) as avg1 FROM results GROUP BY user_id)
in this case results table might have multiple records on 1 user id so basically it gets average score of all users and than sums all average number
by გიორგი უზნაძე
4 years ago
MySQL
0
Pro tip: use ```triple backticks around text``` to write in code fences