title: Access SQL with count function for multiple fields
body: <p>All. I have table looks like</p>
  
  <pre><code>Team1 Team2   result
    a    b        win
    a    c        tie
    b    d        loss
    c    a        win
    d    c        win
  </code></pre>
  
  <p>I want to output team1 result statistics like</p>
  
  <pre><code>Team1  win  loss  tie
    a     4    2    1
    b    2     2    3
  </code></pre>
  
  <p>I can count win cases using   </p>
  
  <pre><code>SELECT TEAM1,Count(Result='win') as Win_Number
  From GAMES
  Where Result='win'
  Group by TEAM1
  </code></pre>
  
  <p>but what should I add to output loss and tie? using join?</p>
  
  <p>UPDATE:  using "iif sum" command solve the problem, see  XQbert's post. Many thanks.</p>