9. ARPU 2.1 Error message in ARPU 2

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.>

Select Daily Players in a with clause.

with daily_revenue as (
    date(created_at) as dt,
    round(sum(price), 2) as rev
  from purchases
  where refunded_at is null
  group by 1
daily_players as (
    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.

I found the error.
In the second part beneath daily_players the “user_id as players”, should have been “count(distinct user_id) as players”


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