Query editor
with first_tx as (select count(distinct taker) as new_user, date_trunc('week', first_trade) as "Date"from (select taker, min(block_date) as first_tradefrom dex.tradeswhere project = 'uniswap'group by 1)group by 2),all_users as (select date_trunc('week', block_date) as "Date", count(distinct taker) as all_userfrom dex.tradeswhere project = 'uniswap'group by 1)select a."Date", all_user, new_user, (all_user - new_user) as retained_userfrom all_users aleft join first_tx f on a."Date" = f."Date"where a."Date" >= date('2023-01-01')order by 1/*with first_tx as (select taker, min(block_date) as first_timefrom dex.tradeswhere project = 'uniswap'and block_date > date('2023-01-01')group by 1)select date_trunc('week', t.first_time) as time, count(distinct t.taker) as new_userfrom first_tx tinner join dex.trades d on t.first_time = d.block_time and t.taker = d.takergroup by 1order by 1*/