We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d75fcf commit 6a39f5eCopy full SHA for 6a39f5e
models/customers.sql
@@ -34,7 +34,8 @@ customer_payments as (
34
35
select
36
orders.customer_id,
37
- sum(amount)::bigint as total_amount
+ sum(amount)::bigint as total_amount,
38
+ bool_or(is_promotion) as has_promoted_orders
39
40
from payments
41
models/staging/stg_payments.sql
@@ -16,7 +16,8 @@ renamed as (
16
payment_method,
17
18
-- `amount` is currently stored in cents, so we convert it to dollars
19
- amount / 100 as amount
+ amount / 100 as amount,
20
+ payment_method == 'coupon' as is_promotion
21
22
from source
23
0 commit comments