title: SQL: Count() based on column value
body: <p>I have a table as follows:</p>
  
  <pre><code>CallID   | CompanyID  | OutcomeID
  ----------------------------------
  1234     | 3344       | 36
  1235     | 3344       | 36
  1236     | 3344       | 36
  1237     | 3344       | 37
  1238     | 3344       | 39
  1239     | 6677       | 37
  1240     | 6677       | 37
  </code></pre>
  
  <p>I would like to create a SQL script that counts the number of Sales outcomes and the number of all the other attempts (anything &lt;> 36), something like:</p>
  
  <pre><code>CompanyID  | SalesCount  | NonSalesCount
  ------------------------------------------
  3344       | 3           | 1
  6677       | 0           | 2
  </code></pre>
  
  <p>Is there a way to do a COUNT() that contains a condition like COUNT(CallID WHERE OutcomeID = 36)?</p>