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

mess up column orders to test Advanced CI #52

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions models/marts/customers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ customer_orders_summary as (
select
orders.customer_id,

count(distinct orders.order_id) as count_lifetime_orders,
count(distinct orders.order_id) > 1 as is_repeat_buyer,
min(orders.ordered_at) as first_ordered_at,
max(orders.ordered_at) as last_ordered_at,
count(distinct orders.order_id) as count_lifetime_orders,
sum(orders.order_total) as lifetime_spend
sum(orders.subtotal) as lifetime_spend_pretax,
min(orders.ordered_at) as first_ordered_at,
sum(orders.tax_paid) as lifetime_tax_paid,
sum(orders.order_total) as lifetime_spend
max(orders.ordered_at) as last_ordered_at,

from orders

Expand All @@ -36,12 +36,12 @@ joined as (
select
customers.*,

customer_orders_summary.count_lifetime_orders,
customer_orders_summary.first_ordered_at,
customer_orders_summary.last_ordered_at,
customer_orders_summary.lifetime_spend_pretax,
customer_orders_summary.count_lifetime_orders,
customer_orders_summary.lifetime_tax_paid,
customer_orders_summary.lifetime_spend,
customer_orders_summary.first_ordered_at,
customer_orders_summary.last_ordered_at,

case
when customer_orders_summary.is_repeat_buyer then 'returning'
Expand Down
Loading