9. arpu 2


#1

with daily_revenue as (
select
date(created_at) as dt,
round(sum(price), 2) as rev
from purchases
where refunded_at is null
group by 1
),
daily_players as (
select
date(created_at) as dt,
count(distinct user_id) as player
from gameplays
group by 1
)
select
daily_revenue.dt,
daily_revenue.rev /
daily_players.players
from daily_revenue
join daily_players order by (dt);

Select ARPU.
Error: near line 1: no such column: daily_players.players

Link: https://www.codecademy.com/courses/sql-analyzing-business-metrics/lessons/common-metrics/exercises/arpu-iii?action=lesson_resume&link_content_target=interstitial_lesson


#2

I have solving...

with daily_revenue as (
select
date(created_at) as dt,
round(sum(price), 2) as rev
from purchases
where refunded_at is null
group by 1
),
daily_players as (
select
date(created_at) as dt,
count(distinct user_id) as players
from gameplays
group by 1
)
select
daily_revenue.dt,
daily_revenue.rev / daily_players.players
from daily_revenue
join daily_players using (dt);


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.