Summing Multiple Records by Month
<p>I want to sum checks to multiple vendors to produce a table giving vendor name, and 12 columns, one for each monthly total.</p>

<pre><code>CHECK TABLE:
Vendor             Trans. Date    Amount
Able Mfg           2008-01-07     227.32
Acme Wolf Tails    2008-03-01      12.00
Able Mfg           2008-01-23     142.50

NEW TABLE:
Vendor            Jan     Feb     Mar     Apr    May ...
Able Mfg        369.82     0       0      0       0
Acme Wolf Tails                  12.00
</code></pre>

<p>Here's what I have so far.  I get the error, "Subquery returns more than one row":</p>

<pre><code>select 
    `Pay To`,       
    MONTH(`Transaction Date`) AS `Trans Month`,
    (SELECT 
            SUM(`Charge Amount`)
        FROM `Check Table` 
        WHERE MONTH(`Transaction Date`) = 1
        GROUP BY `Pay To`) as `Jan`,
    (SELECT 
            SUM(`Charge Amount`)
        FROM `Check Table` 
        WHERE MONTH(`Transaction Date`) = 2
        GROUP BY `Pay To`) as `Feb`,
    (SELECT 
            SUM(`Charge Amount`)
        FROM `Check Table` 
        WHERE MONTH(`Transaction Date`) = 3
        GROUP BY `Pay To`) as `Mar`
FROM `Check table`
WHERE `Charge Amount` != 0
GROUP BY `Pay To`
ORDER BY `Pay To`; 
</code></pre>