title: SQL Select aggregate values in column
body: <p>I'm curious, is this result set can be achieved with sql query?</p>
  
  <p>Here is the table</p>
  
  <pre><code>item_id    name       availability
  -----------------------------------
  1          brush      available
  2          brush      available
  3          paint      not available
  4          paint      available
  </code></pre>
  
  <p>here is the result</p>
  
  <pre><code>name         available    not available
  ---------------------------------------
  brush        2            0
  paint        1            1
  </code></pre>
  
  <p>what could the query look like?</p>