title: MySQL query that generates Months as columns
body: <p>I am trying to generate a report in MySQL of monthly revenues per source(provider) and what i want is to see the months as columns and the revenues as rows.</p>
  
  <p>I have written this query but i don\t know what to write to get the months as columns:</p>
  
  <pre><code>SELECT  T1.provider_id, T2.ad_provider, MONTH(date) AS MONTH, round(SUM(T1.revenue),2) as RevenueTotal 
  FROM revenue_metrics as T1
  LEFT JOIN ad_provider as T2 ON T1.provider_id=T2.id
  GROUP BY T1.provider_id, MONTH
  ORDER BY MONTH, `RevenueTotal`  DESC
  </code></pre>