title: Combine SQL queries with different WHERE causes
body: <p>I have written a database with game stats, featuring winner, loser, and money won. I'm now trying to make stats for it.</p>
  <p><a href="https://i.stack.imgur.com/Tyzhl.png" rel="nofollow noreferrer">See database here</a></p>
  <p>I'm trying to make stats for these games, etc number of wins/losses for player, and money lost and money won.</p>
  <p>Till now I have found three queries to achieve this.</p>
  <pre><code>SELECT COUNT(winner) AS wins, COUNT(loser) AS losses 
  FROM coinflipper_games 
  WHERE winner = &quot;dba92393-5bbd-365f-8fe7-55be2707caf3&quot; 
     OR loser = &quot;dba92393-5bbd-365f-8fe7-55be2707caf3&quot;
  
  SELECT SUM(money) 
  FROM coinflipper_games 
  WHERE winner = &quot;dba92393-5bbd-365f-8fe7-55be2707caf3&quot;
  
  SELECT SUM(money) 
  FROM coinflipper_games 
  WHERE loser = &quot;dba92393-5bbd-365f-8fe7-55be2707caf3&quot;
  </code></pre>
  <p>The problem is, it's in no way effective using three queries, so I'm trying to reduce this to one. Does anyone have any idea what I can do?</p>