'Redeemed Stripe Coupons Report (Sigma)

I am trying to generate a report of coupons redeemed by month but am not getting correct numbers. So I did this query to give me all time redemptions for a specific coupon:

select
   count(*) as Redeemed
from
  subscriptions 
where  subscriptions.discount_coupon_id = 'FREE25OFF'

This returns 129:

enter image description here

However, when I view how many redemptions it has in the Stripe control panel, it says it has been redeemed 1,209 times:

enter image description here

I don't understand the discrepancy here?



Solution 1:[1]

Turns out it is better to query against the Invoice table. That solved the issue!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jafo