title: Sum and group multiple fields by date + other field
body: <p>I have a table with 3 columns as shown below.  I would like to summarize the cost for each TYPE (only 0/1/2), and then group it by Month and Year (of the DATE field), all using a select statement.</p>
  
  <pre><code>+------------+------+-------+
  | DATE       | TYPE | COST  |
  +------------+------+-------+
  | Feb-1-2003 |  0   | 19.40 |
  | Feb-5-2010 |  1   | 28.10 |
  | Mar-3-2011 |  2   | 64.20 |
  | Sep-8-2012 |  0   | 22.60 |
  | Dec-6-2013 |  1   | 13.50 |
  +------------+------+-------+
  </code></pre>
  
  <p>The output would look like:</p>
  
  <pre><code>+----------+------------+------------+------------+
  | PERIOD   | TYPE0      | TYPE1      | TYPE2      |
  +----------+------------+------------+------------+
  | Jan 2003 | 123123.12  | 23432.12   | 9873245.12 |
  | Feb 2003 | 123123.12  | 23432.12   | 9873245.12 |
  | Mar 2003 | 123123.12  | 23432.12   | 9873245.12 |
  etc...
  +----------+------------+------------+------------+
  </code></pre>
  
  <p>Can someone help with this select statement?</p>