woothemes/woocommerce — pull request #1520 by maxrice (2012-09-20 18:29:08+00:00)
Title: added sales by coupon report

initial version of sales by coupon report. Since multiple coupon codes for a single order are stored comma separated, this report considers them as 1 coupon. Handling multiple coupons within an order as individual coupons with the report would be quite a bit more complex --I think most stores force individual use on coupons anyway.

Report loads for 5 coupons in about 7-10 seconds in a store with 5,000 orders.