Query editor
with lp_transfer as (select evt_block_time, "to" as address, cast(value as double) as valuefrom erc20_ethereum.evt_Transferwhere contract_address = 0x35c5C8C7B77942f9D44B535Fa590D8b503B2b00C -- DUSD/sDAI LPand "to" = 0x08e179Cf6F2Ca5dff67E93CdfBE2a29B2d8A27F7 -- Aura DUSD/sDAI Pooland evt_block_time >= cast('2023-10-24' as timestamp) -- pool createdand cast(value as double) is not nullunion allselect evt_block_time, "from" as address, (-1)* cast(value as double) as valuefrom erc20_ethereum.evt_Transferwhere contract_address = 0x35c5C8C7B77942f9D44B535Fa590D8b503B2b00C -- DUSD/sDAI LPand "from" = 0x08e179Cf6F2Ca5dff67E93CdfBE2a29B2d8A27F7 -- Aura DUSD/sDAI Pooland evt_block_time >= cast('2023-10-24' as timestamp) -- pool createdand cast(value as double) is not null),lp_balance as (select address, sum(value/1e18) as holdingfrom lp_transfergroup by 1),lp_supply as (select time, "supply DUSD/sDAI LP" as pool_valuefrom query_3925233order by time desclimit 1)select row_number() over (order by holding desc) as lp_rank,address, holding as "balance_amount_DUSD/sDAI",round((holding/pool_value)*100, 2) as "pool_share(%)", '<a href=https://etherscan.io/address/' || cast(address as varchar) || ' target=_blank>etherscan</a>' as etherscan,'<a href=https://debank.com/profile/' ||cast(address as varchar) || ' target=_blank>DeBankProfile</a>' as debankfrom lp_balance, lp_supplywhere holding > 0.1 -- ignore dustorder by holding desc