Query editor
with lp_total as (select sum(balance) as balance from query_2850337),staking_total as (select sum(balance) as balance from query_2850369),total_balance as (select (coalesce(lp_total.balance, 0) + coalesce(staking_total.balance, 0)) as total from lp_total cross join staking_total),arx_balance as (select output__reserve1/1e18 as reserve from arx_arbitrum.ArbDexPair_call_getReserves where contract_address = 0x62fddfc2d4b35adec79c6082ca2894eab01ac0db and call_success = true order by call_block_number desc limit 1)selectcoalesce(lp.account, staking.account) as account, (coalesce(lp.balance, 0) + coalesce(staking.balance, 0)) as balance,((coalesce(lp.balance, 0) + coalesce(staking.balance, 0)) / total_balance.total * 100) as ratio,(((coalesce(lp.balance, 0) + coalesce(staking.balance, 0)) / total_balance.total) * arx_balance.reserve) as arxfrom query_2850337 as lp full join query_2850369 as staking on lp.account = staking.account cross join total_balance cross join arx_balanceorder by balance desc;