title: SQL server: convert rows to columns
body: <p>I have a table with columns <code>sales(int)</code>, <code>month(int)</code>. I want to retrieve sum of sales corresponding to every month. I need ouput in form of 12 columns corresponding to each month in which there will be a single record containing sales for for each column(month).</p>