SQL: Outputting month names in correct order
<p>I am using the query composer on Google BigQuery.
I want to output the months in the correct order, e.g. starting with January, ending with December.</p>

<p>Here is my query:</p>

<pre><code>SELECT month, gender, SUM(cost) AS Cost
FROM [medicare.medicareTable]
GROUP BY month, gender
ORDER BY month, gender
</code></pre>

<p>Without the <code>ORDER BY</code> above, the months were in a completely random order. Now they are alphabetised, which is a little better but still not what I want. </p>

<p>Using the above query, the output looks like this: <a href="https://docs.google.com/spreadsheets/d/18r_HhY1jG3Edkj5Nk8gDM_eSQ_1fI6ePHSZuJuoAppE/edit?usp=sharing" rel="nofollow">https://docs.google.com/spreadsheets/d/18r_HhY1jG3Edkj5Nk8gDM_eSQ_1fI6ePHSZuJuoAppE/edit?usp=sharing</a></p>

<p>Thanks to anyone who can help.</p>