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

Fix repo #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix repo #27

wants to merge 1 commit into from

Conversation

WillC3
Copy link

@WillC3 WillC3 commented Apr 11, 2024

No description provided.

@WillC3 WillC3 force-pushed the willc-fix-repo branch 5 times, most recently from 1a9195c to fd3a7ad Compare April 11, 2024 14:07
, COUNT(customers.customer_id) AS new_customer_count
FROM {{ ref('wh_customers') }} AS customers
GROUP BY DATE_TRUNC('MONTH', customers.first_order)
ORDER BY DATE_TRUNC('MONTH', customers.first_order) DESC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No 'order bys' :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok ! Yes thinking about it that makes sense as whatever uses the model can order if needed?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never hardcode in 'order bys' in models (downstream process can do that if necessary) this is just the because of the added processing required.
Order bys that are part of window functions are okay ROW_NUMBER() OVER (PARTITION BY col1 ORDER BY col2)

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

Successfully merging this pull request may close these issues.

2 participants