Query editor
--from 0xTayasawith eth_amt as (select * from(select sum("sum_amount")/1e18 as amount, addressfrom (select sum(cast(value as double)) as "sum_amount", "to" as address from erc20_ethereum.evt_Transfer where contract_address= 0x205eD31C867bF715E4182137Af95AFE9177Cd8E7 and evt_block_time >= cast('2022-07-27' as timestamp) group by "to"union allselect -sum(cast(value as double)) as "sum_amount", "from" as address from erc20_ethereum.evt_Transfer where contract_address= 0x205eD31C867bF715E4182137Af95AFE9177Cd8E7 and evt_block_time >= cast('2022-07-27' as timestamp) group by "from") tgroup by address)where amount > 0.000000001),poly_amt as (select * from(select sum("sum_amount")/1e18 as amount, addressfrom (select sum(cast(value as double)) as "sum_amount", "to" as address from erc20_polygon.evt_Transfer where contract_address= 0xBF9f916bBda29A7F990F5F55c7607D94D7C3A60b and evt_block_time >= cast('2022-08-06' as timestamp) group by "to"union allselect -sum(cast(value as double)) as "sum_amount", "from" as address from erc20_polygon.evt_Transfer where contract_address= 0xBF9f916bBda29A7F990F5F55c7607D94D7C3A60b and evt_block_time >= cast('2022-08-06' as timestamp) group by "from") tgroup by address)where amount > 0.000000001),combined_amt as (select case when ea.address is null then pa.address else ea.address end as wallet,case when ea.amount is null then 0 else cast(ea.amount as double) end as eth_holding,case when pa.amount is null then 0 else cast(pa.amount as double) end as poly_holdingfrom eth_amt eafull outer join poly_amt paon ea.address = pa.address),wallet_label as (select *,case when wallet=0x9170e48f9b64f67d35b91f80da059e3225a507ed then 'DEFY Token Treasury'when wallet=0x9de23d5EE03151496622B5fe9299F02Ba3A0ED9A then 'DEFY Token Vesting Escrow' -- 1 strategic investors, initially 500,000,000 DEFY tokens, 2 investors 120,140,000 DEFY, KOL 4,653,333 DEFY tokens tokens, 366,800,000 DEFY TEAM, 8,200,000 DEFY tokens strategic investorswhen wallet=0x3064c8632062388f00780baBdc027940506803FF then 'DEFY Token Liquidity Pool (Ethereum)'when wallet=0x800c8bfA52D555B91549a67b5e7c4b0a386DE0fB then 'DEFY Token Liquidity Pool (Polygon)'when wallet=0x8e2d2d94A438D2bC6Bda30fcE9aCd04A99Db4Bce then 'DEFY Token Game Rewards'when wallet=0x40ec5B33f54e0E8A33A975908C5BA1c14e5BbbDf then 'Polygon Bridge' --- need to be excludedwhen wallet=0xf89d7b9c864f589bbf53a82105107622b35eaa40 then 'Bybit'when wallet=0xae2bf730327e95f3998f730ad31cfff29382aabd then 'DEFY In-Game Bridging'when wallet=0x3e61c35f4d590511df6ff7137ff6b5fa5ae09374 then 'KOL#1'when wallet=0x01204297db860f097c2902be6d6ac3e654b89c66 then 'KOL#2'when wallet=0x544945367cc93134fa0b462a9cc278634605f34c then 'KOL#3'when wallet=0xc8348f201deff19ad5d0a87e8153d9d376faa8e2 then 'KOL#4'when wallet=0x40394c0f96c3cfaaca7235776d1b01cc4df5c4b9 then 'KOL#5'when wallet=0x51446be9a4f67d07fe1dc8b7050360ff836b31c1 then 'KOL#6'when wallet=0xcc2b871cfcfb8445b49bf1892d84c8ea17c1d941 then 'KOL#7'when wallet=0x0738fe398e9333dc323353ddc8602ea6843aae76 then 'KOL#8'when wallet=0x17cfc17e074b8af3b9611762cdd0a5575a58697b then 'Blackmarket Royalty Fee Receipient'end as labelfrom combined_amt)