Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into more_generic
Browse files Browse the repository at this point in the history
  • Loading branch information
annafil authored Sep 9, 2021
2 parents 8b69516 + b08b27e commit 8ebbc1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions models/customers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ customer_orders as (
count(order_id) as number_of_orders
from orders

group by 1
group by customer_id

),

Expand All @@ -41,7 +41,7 @@ customer_payments as (
left join orders on
payments.order_id = orders.order_id

group by 1
group by orders.customer_id

),

Expand Down
3 changes: 2 additions & 1 deletion models/orders.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ order_payments as (

from payments

group by 1
group by order_id

),

Expand All @@ -47,6 +47,7 @@ final as (

from orders


left join order_payments
on orders.order_id = order_payments.order_id

Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_payments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ renamed as (
order_id,
payment_method,

--`amount` is currently stored in cents, so we convert it to dollars
-- `amount` is currently stored in cents, so we convert it to dollars
amount / 100 as amount

from source
Expand Down

0 comments on commit 8ebbc1e

Please sign in to comment.