Query editor
with first_tx as (select count(distinct taker) as new_user, date_trunc('day', 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('day', 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