title: Extract Month and Year from timestamp in Bigquery
body: <p>I would like to extract month and year from Timestamp column(YYYYMMDD HHMMSS) and if month is 1,it should create a column called 'January' and month is 2,it should create column called 'February'.</p>
  
  <p>Here is the query i have tried but no luck.</p>
  
  <pre><code>SELECT
    SUM(case when extract(month() from timestamp) = 1 and extract(year() from timestamp) = '2018' then total else 0 end ) as January ,
    SUM(case when extract(month() from timestamp) = 2 and extract(year() from timestamp) = '2018' then total else 0 end ) as February, and so on until December..
  
  FROM x;
  </code></pre>