title: Query in Oracle between time periods
body: <p>I have the following question, when I make a query, how can I return the sums in different columns in various periods of time, for example I have this table:</p>
  <pre><code>  ---------------------------
    | PRODUCT | VALUE | MONTH |
    ---------------------------
    | P1      | 10    |  2    |
    | P1      |  5    |  3    |
    | P1      |  22   |  4    |
    | P1      |  4    |  2    |
    | P2      |  4    |  2    |
    | P2      |  7    |  4    |
    | P2      |  10   |  4    |
  </code></pre>
  <p>And I wish I had this result</p>
  <pre><code>  --------------------------------------
    | PRODUCT | MONTH2 | MONTH3 | MONTH4 |
    --------------------------------------
    | P1      | 14       |  5    | 22    |
    | P2      | 4        |  0    | 17    |
  </code></pre>