File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ customer_orders as (
26
26
count (order_id) as number_of_orders
27
27
from orders
28
28
29
- group by 1
29
+ group by customer_id
30
30
31
31
),
32
32
@@ -41,7 +41,7 @@ customer_payments as (
41
41
left join orders on
42
42
payments .order_id = orders .order_id
43
43
44
- group by 1
44
+ group by orders . customer_id
45
45
46
46
),
47
47
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ order_payments as (
25
25
26
26
from payments
27
27
28
- group by 1
28
+ group by order_id
29
29
30
30
),
31
31
@@ -47,6 +47,7 @@ final as (
47
47
48
48
from orders
49
49
50
+
50
51
left join order_payments
51
52
on orders .order_id = order_payments .order_id
52
53
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ renamed as (
15
15
order_id,
16
16
payment_method,
17
17
18
- -- `amount` is currently stored in cents, so we convert it to dollars
18
+ -- `amount` is currently stored in cents, so we convert it to dollars
19
19
amount / 100 as amount
20
20
21
21
from source
You can’t perform that action at this time.
0 commit comments