Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe analysis bug? #38

Open
brynary opened this issue Jun 17, 2016 · 0 comments
Open

Stripe analysis bug? #38

brynary opened this issue Jun 17, 2016 · 0 comments

Comments

@brynary
Copy link

brynary commented Jun 17, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant