Hi, I’m stuck and tried various codes with no success. Please help
select
date(created_at),
round(sum(price) / count(distinct(user_id), 2) as arppu
from purchases
where refunded_at is null
group by 1
order by 1;
Hi, I’m stuck and tried various codes with no success. Please help
select
date(created_at),
round(sum(price) / count(distinct(user_id), 2) as arppu
from purchases
where refunded_at is null
group by 1
order by 1;
Just when you give up and needed help, you find a silly error. I was missing “)” on the count distinct part
select
date(created_at),
round(sum(price) / count(distinct(user_id)), 2) as arppu
from purchases
where refunded_at is null
group by 1
order by 1;
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.