Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/SELECTsum_usd,symbol,labelFROM (selectSUM((amt * p.price) / power(10, p.decimals)) as sum_usd,p.symbol,labelfrom(-- Already in Poolselecte.contract_address as token,-cast(value as double) as amt,'claimable' as labelfrom erc20_ethereum.evt_Transfer ewhere "from" = 0xbbcec987E4C189FCbAB0a2534c77b3ba89229F11UNION ALLselecte.contract_address as token,cast(value as double) as amt,'claimable' as labelfrom erc20_ethereum.evt_Transfer ewhere "to" = 0xbbcec987E4C189FCbAB0a2534c77b3ba89229F11UNION ALL-- Not yet distributedselecte.contract_address,-cast(value as double) as amt,'to distribute' as labelfrom erc20_ethereum.evt_Transfer ewhere "from" = 0xaD30f7EEBD9Bd5150a256F47DA41d4403033CdF0UNION ALLselecte.contract_address as token,cast(value as double) as amt,'to distribute' as labelfrom erc20_ethereum.evt_Transfer ewhere "to" = 0xaD30f7EEBD9Bd5150a256F47DA41d4403033CdF0UNION ALL--Distributed but not withdrawnSELECTtoken,amount * 0.86 as amt,'to withdraw' as labelFROM splits_ethereum.SplitMain_evt_DistributeERC20WHERE split = 0xaD30f7EEBD9Bd5150a256F47DA41d4403033CdF0