Query editor
with tmp as (select"from" as addr,token_symbol,cast(value as double) / POW(10, decimals) as amountfrom erc20_ethereum.evt_Transfer etinner join dune.hashed_official.result_lst_tokens lst on et.to = lst.restaking_contract and et.contract_address = lst.token_contractUNION ALLselectto as addr,token_symbol,-cast(value as double) / POW(10, decimals) as amountfrom erc20_ethereum.evt_Transfer etinner join dune.hashed_official.result_lst_tokens lst on et."from" = lst.restaking_contract and et.contract_address = lst.token_contract),users as (selectaddr,token_symbol,sum(amount) as amountfrom tmpgroup by 1, 2having sum(amount) > 0),eth_price as (select pricefrom(selectprice,ROW_NUMBER() OVER (PARTITION BY contract_address ORDER BY minute DESC) AS indexfrom prices.usdwhere symbol = 'ETH') tmpwhere index = 1)selectsum(amount) as total_lst_eth,count(distinct addr) as total_depositor,sum(amount) * (select avg(price) from eth_price) as total_amount_in_usdfrom users