Query editor
with users_details as (select block_time,"from" as addressfrom bnb.transactions t1union allselect block_time,"to" as addressfrom bnb.transactions t2),users_initial_transaction as (select address,date_trunc('day', min(block_time)) as min_block_datefrom users_detailsgroup by 1),new_users_daily as (select min_block_date as block_date,count(address) as new_users_countfrom users_initial_transactiongroup by 1),active_users_daily as (select date_trunc('day', block_time) as block_date,count(distinct address) as active_users_countfrom users_detailsgroup by 1)select u.block_date,active_users_count,coalesce(new_users_count, 0) as new_users_count,active_users_count - coalesce(new_users_count, 0) as existing_users_countfrom active_users_daily uleft join new_users_daily n on u.block_date = n.block_datewhere u.block_date > date_trunc('day', NOW() - interval '180' day)order by u.block_date