This is my code
select
date(g1.created_at) as dt,
round(100 * count(distinct g2.user_id) as retained_users /
count(distinct g1.user_id) as total_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;
and my error message is 'Error: near line 1: near “as”: syntax error’
But it seems that there is no error near line 1
I want to finish this course overcoming this last hurdle.
Help me.