Query editor
--Query Name Inception Depositorswithraw_data as (select *, address as userfrom query_3829482),first_touch as (select distinct user, min(evt_block_time) as first_time, 'new depositor' as user_typefrom raw_datagroup by 1),user_return_or_not as (select a.*, coalesce(user_type,'returning depositor') as user_typefrom raw_data aleft join first_touch f on a.user = f.user and a.evt_block_time = f.first_time),user_data_summary as (select date_trunc('day',evt_block_time) as "date", /*user_type*/ count(case when user_type='new depositor' then user else null end) as new_restakers,count(case when user_type!='new depositor' then user else null end) as returning_depositors, count(distinct user) as active_restakers,sum(count(case when user_type='new depositor' then user else null end)) over (order by date_trunc('day',evt_block_time)) as unique_restakersfrom user_return_or_notgroup by 1)select "date", new_restakers, returning_depositors, unique_restakers, active_restakers,cast(active_restakers as double)/cast(unique_restakers as double) as growth_percent,100.0*cast(active_restakers as double)/cast(unique_restakers as double) as growth_percent_counter/*active_restakers/(unique_restakers-active_depositors) as growth_percent*/from user_data_summaryorder by 1 desc