Skip to content

Stripe analysis bug? #38

@brynary

Description

@brynary

I posted this as a comment on this blog post but it's probably more relevant here...

I was playing with this tonight and think I may have found a bug…

Essentially, what I’m seeing is that the Stripe subscriptions table only includes active subscriptions, not all historical subscriptions. Therefore, it’s not possible to join subscriptions reliably against invoices in order to determine the interval/period of the invoice (“monthly” or “yearly”).

I noticed your SQL does a left outer join against subscriptions, so I wonder if perhaps this is something you ran into. (If subscriptions were reliably present for all invoices, I’d expect an inner join would work.

The effect of this, I believe, is that old invoices for yearly plans (for which the subscription is no longer present) may be incorrectly treated as monthly, and inflate the dollar values (because they are not being divided by 12).

Disclaimer: I’m not a data analysis, and pretty rusty with SQL, so I could be completely off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions