title: MySQL query to return 2 counts on same data field
body: <p>I want to show 2 counts of the same data, one without a condition and with a condition, probably a very simple thing for most people on this list:</p>
  
  <p>When I run this I get my Total of all machines:</p>
  
  <pre><code>SELECT COUNT(ComputerID) AS 'Grand Total'
  FROM computers
  </code></pre>
  
  <p>When I run this I get the total of OnLine machines:</p>
  
  <pre><code>SELECT COUNT(ComputerID) AS 'OnLine Total'
  FROM computers
  WHERE LastContact &gt; DATE_ADD(NOW(),INTERVAL -6 MINUTE)
  </code></pre>
  
  <p>How can I combine the 2 into 1 query to show something like this:</p>
  
  <pre><code>Grand Total          OnLine Total
  2,500                2,145
  </code></pre>
  
  <p>Thanks!</p>