title: sql query to count two type in single cloumn
body: <pre><code>BUSES
  ----------------
  |BUS_NO    
  |BUS_NAME
  |TYPE
  |AVAIL_SEAT
  </code></pre>
  
  <p>I have to calculate how many <code>AC</code> and <code>NON AC</code> buses are there?</p>
  
  <p>My query for <code>count</code> is: </p>
  
  <pre><code>count(*)bus_count
  sum(case when type='ac' then 1 else 0)
  sum (case when type="non ac" then 1 else 0)
  from buses
  group by bus_number;
  </code></pre>