DataScience100Knock-S34
code:1.sql
with sums as
(
select customer_id, sum(amount) as sum_amount
from receipt
group by customer_id
)
select avg(sum_amount)
from sums
where customer_id not like 'Z%';
## 2547.7422345292559595
これでもいいはず
code:2.sql
%%sql
select cast(sum(amount) as float)/count(distinct(customer_id))
from receipt
where customer_id not like 'Z%';