Query editor
/*Query produces a table of $APE claimers together with their total claim amounts and current $APE balances*/with-- 1. Fetching current $APE holdersapecoin_holders as (selectwallet,apecoin_balance,apecoin_stakefrom query_3999447where apecoin_balance > 0or apecoin_stake > 0),-- 2. Fetching $APE claimersapecoin_claimers as (selecta."to" as claimer,sum(a.value)/1e18 as total_claimed_amtfrom erc20_ethereum.evt_transfer ainner join ethereum.transactions bon a.evt_tx_hash = b.hashwhere a.contract_address = 0x4d224452801aced8b2f0aebe155379bb5d594381and a."from" = 0x025C6da5BD0e6A5dd1350fda9e3B6a614B205a1Fand cast(b.data as varchar) like '%0x48c54b9d%'group by a."to")selecta.claimer as claimer,a.total_claimed_amt as apecoin_claimed,coalesce(b.apecoin_balance, 0) as apecoin_balance,coalesce(b.apecoin_stake, 0) as apecoin_stakefrom apecoin_claimers aleft join apecoin_holders bon a.claimer = b.walletwhere a.total_claimed_amt > 0 -- 3 addresses claimed 0 $APE, like https://etherscan.io/tx/0x1324fe0bf2e5926382cdb296105e913670feddf24b99afdb921eda4a11647c2eorder by a.total_claimed_amt desc