Итак, у меня есть таблица, в которой я собираю данные каждого человека.
+--------+-------+--------+---------+----------------+
| player | kills | deaths | assists | champSelection |
+--------+-------+--------+---------+----------------+
| Bob | 1 | 3 | 4 | Horse |
+--------+-------+--------+---------+----------------+
| Bob | 2 | 7 | 5 | Horse |
+--------+-------+--------+---------+----------------+
| Jake | 5 | 5 | 5 | Dog |
+--------+-------+--------+---------+----------------+
| Marie | 2 | 3 | 4 | Dog |
+--------+-------+--------+---------+----------------+
| Marie | 1 | 1 | 9 | Horse |
+--------+-------+--------+---------+----------------+
| Marie | 6 | 7 | 2 | Dog |
+--------+-------+--------+---------+----------------+
И я запускаю
SELECT player, sum(kills), sum(deaths), sum(assists)
FROM playerTable
GROUP BY player
ORDER BY player ASC;
Как мне добавить в свой запрос, где они чаще всего ChampSelection есть? Я пытаюсь отобразить свою таблицу как
+--------+-------+--------+---------+----------------+
| player | kills | deaths | assists | champSelection |
+--------+-------+--------+---------+----------------+
| Bob | 3 | 10 | 9 | Horse |
+--------+-------+--------+---------+----------------+
| Jake | 5 | 5 | 5 | Dog |
+--------+-------+--------+---------+----------------+
| Marie | 9 | 11 | 15 | Dog |
+--------+-------+--------+---------+----------------+