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

BUG - most_recent_sale_date using wrong aggregation #27

Closed
fivetran-joemarkiewicz opened this issue Feb 1, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@fivetran-joemarkiewicz
Copy link
Contributor

Are you a current Fivetran customer?

Fivetran created Bug

Describe the bug

The calculation for most_recent_sale_date is currently using a min aggregation. However, it should instead be max.

min(case when type in ('charge', 'payment')
then {{ date_timezone('created_at') }}
else null
end) as most_recent_sale_date

Expected behavior

The most_recent_sale_date should be the max date.

@fivetran-joemarkiewicz fivetran-joemarkiewicz added the bug Something isn't working label Feb 1, 2022
@fivetran-joemarkiewicz
Copy link
Contributor Author

The merged PR above resolved this issue and the fix is live in the latest version of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant