title: How do I combine 3 select statements into one? (SQL Server 2008)
body: <p>I have 4 sql statements, each returns 2 columns</p>
  
  <pre><code>select count(id) open, sum(amount) from A where status = 1 group by est_id
  </code></pre>
  
  <blockquote>
    <p>result: 25 | 4400</p>
  </blockquote>
  
  <pre><code>select count(id) close, sum(amount) from A where status = 2 group by est_id
  </code></pre>
  
  <blockquote>
    <p>result:   0 | 0</p>
  </blockquote>
  
  <pre><code>select count(id) stop, sum(amount) from A where status = 3 group by est_id
  </code></pre>
  
  <blockquote>
    <p>result: 20 | 4000</p>
  </blockquote>
  
  <p>I need to return the result of the 4 sql sql statement in one, for example:</p>
  
  <pre><code>25 | 4400| active
  0  | 0   | inactive
  20 | 4000| close
  </code></pre>
  
  <p>regards</p>