Hi everyone,
When I run the code below I get the error message ‘Select Daily players in a with clause’. However if i put a ‘with’ before daily players the code doesn’t even run. When I run it like the code is below I do get a query result; however the only results are DT and Players and thus no results from the first part (the revenue).
<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/sql-analyzing-business-metrics/lessons/common-metrics/exercises/arpu-iii?action=resume
Select Daily Players in a with clause.
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,
user_id as players
from gameplays
group by 1
)
select * from daily_players order by dt;
Any help would be great.