Query editor
select count(distinct user) as cumulative_users, sum(case when balance > 0 then 1 else 0 end) as active_usersfrom (select user, sum(amount) as balancefrom (select cast(amount0 as decimal(38,0)) + cast(amount1 as decimal(38,0)) as amount, sender as userfrom pancakeswap_v2_bnb.pancakepair_evt_mintwhere contract_address = lower('{{pair_address}}')union allselect cast(amount0 as decimal(38,0)) + cast(amount1 as decimal(38,0))*-1 as amount, sender as userfrom pancakeswap_v2_bnb.pancakepair_evt_burnwhere contract_address = lower('{{pair_address}}'))group by 1)