Query editor
with ankrBNB_transfer as (select "to" as address, (cast(value as double)) as valuefrom ankr_bnb.ankrBNB_evt_Transferwhere evt_block_time >= date('2022-12-08') -- contract deployedand "to"!= 0x0000000000000000000000000000000000000000 -- Null Addressand (cast(value as double)) is not nullunion allselect "from" as address, ((-1) * (cast(value as double))) as valuefrom ankr_bnb.ankrBNB_evt_Transferwhere evt_block_time >= date('2022-12-08') -- contract deployedand "from" != 0x0000000000000000000000000000000000000000 -- Null Addressand (cast(value as double)) is not null),ankrBNB_balance as (select address, sum(value/1e18) as amountfrom ankrBNB_transfergroup by 1order by 2 desc),contract_creation_date as (select date('2022-12-08') as creation_date),transaction_count as (select count(*) as transaction_countfrom ankr_bnb.ankrBNB_evt_Transferwhere evt_block_time >= date('2022-12-08') -- contract deployedand ("to" != 0x0000000000000000000000000000000000000000 or "from" != 0x0000000000000000000000000000000000000000)),summary as(select count(distinct mb.address) as unique_users, extract(day from now() - cc.creation_date) as days_after_creation, tc.transaction_countfrom ankrBNB_balance mbcross join contract_creation_date cccross join transaction_count tcwhere amount > 0.00000001 -- dust includedgroup by 2, 3)select *from summary