Query editor
with staked_amt as (select address, sum(amt) as staked_amtfrom (select "from" as address, sum(value) / power (10, 18) as amtfrom erc20_base.evt_transferwhere "to" = 0x33e34b8684565fcf6a9dd52a7e92c4e70211a045 -- staking contract addressgroup by "from"union allselect "to" as address, -sum(value) / power (10, 18) as amtfrom erc20_base.evt_transferwhere "from" = 0x33e34b8684565fcf6a9dd52a7e92c4e70211a045 -- staking contract addressgroup by "to")group by address)select count(distinct address) as no_stakersfrom staked_amt