13.1 day retention 3 - part 3


#1

select
date(g1.created_at) as dt,
round(100 * count(total_users) /
count(retained_users)) as retention
from gameplays as g1
left join gameplays as g2 on
g1.user_id = g2.user_id
and date(g1.created_at) = date(datetime(g2.created_at, '-1 day'))
group by 1
order by 1
limit 100;

This is my code and I cannot work out where I have gone wrong.


#2

What error are you receiving?


#3

Use count(disninct g2.user_id) / count(distinct g1.user_id)


#4

@lilrock

Have a close look at

disninct


#5

Typo. lol distinct.