title: Multiple SQL queries in the same select?
body: <p>I am trying to combine multiple selects in one query to use as little data as possible.
  I have this sql table (example)</p>
  
  <pre><code>id category status
  1   test1    A
  2   test2    B
  3   test1    A
  4   test3    B
  5   test1    C
  </code></pre>
  
  <p>First of all i want to select how many rows there is with the same category.</p>
  
  <pre><code>SELECT category, COUNT(category) FROM test GROUP BY category
  </code></pre>
  
  <p>Then i would like to count the status in each category. I would do this with this query.</p>
  
  <pre><code>SELECT status, COUNT(status) FROM test WHERE category = 'test1' GROUP BY STATUS
  </code></pre>
  
  <p>So i want one column with total and then each categorys number of status.
  Can i somehow combine these? Is that even possible or do i just have to realize that I have to get the data multiple times to have the right result?</p>