Query editor
--Thanks to @maybeYonaswithactions as (select * from query_3818541),agg as (selecta.underlying_token,a.staker,sum(case actionwhen 'deposit' then (shares/1e18)else -(shares/1e18)end) as sharesfrom actions agroup by 1,2),latest_prices as (select * from (-- daily pricesselect *,rank() over(partition by token order by date desc) as rank_latestfrom query_3697486) where rank_latest = 1),token_agg as (selectp.symbol,a.underlying_token,a.staker,a.shares as tokens,a.shares*p.price/w.price as eth,a.shares*p.price as usdfrom agg aleft join latest_prices pon p.token = a.underlying_tokenleft join latest_prices won w.token = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2),operator_ranked as (selectrank() over(order by usd desc) as user_rank,*from (selectstaker,sum(usd) as usd,sum(eth) as eth_v,sum(case when underlying_token = 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0 then tokens else 0 end) as "wstETH",sum(case when underlying_token = 0xBe9895146f7AF43049ca1c1AE358B0541Ea49704 then tokens else 0 end) as "cbETH",sum(case when underlying_token = 0xae78736Cd615f374D3085123A210448E74Fc6393 then tokens else 0 end) as "rETH",sum(case when underlying_token = 0xa2E3356610840701BDf5611a53974510Ae27E2e1 then tokens else 0 end) as "wBETH",sum(case when underlying_token = 0xf951E335afb289353dc249e82926178EaC7DEd78 then tokens else 0 end) as "swETH",sum(case when underlying_token = 0xA35b1B31Ce002FBF2058D22F30f95D405200A15b then tokens else 0 end) as "ETHx",sum(case when underlying_token = 0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa then tokens else 0 end) as "mETH",sum(case when underlying_token = 0xac3E018457B222d93114458476f3E3416Abbe38F then tokens else 0 end) as "sfrxETH"from token_agggroup by 1)