mySQL subqueries calculating winning percentage
SELECT player_id,
       COUNT(result) total,
       ROUND(100 * SUM(result = 'WIN') / COUNT(result)) winning_percent,
       ROUND(100 * SUM(result = 'LOSE') / COUNT(result)) loosing_percent
FROM game
GROUP BY player_id;

https://dbfiddle.uk/?rdbms=mysql_8.0&amp;fiddle=a04d576b918c392f90c1d835fd1a6f51