Query editor
with bc as (select "to" as holder,amount_raw as balanceChangefrom tokens.transferswhere contract_address = {{tokenContract}}and block_date < date '{{date}}'union allselect "from" as holder,-amount_raw as balanceChangefrom tokens.transferswhere contract_address = {{tokenContract}}and block_date < date '{{date}}'),b as (select holder, SUM(balanceChange) as balancefrom bcgroup by 1order by 2 desc)selectholder as holder,balance as balancefrom bwhere balance > 0order by 2 desc