sunshine-juliaGain or Lose 2
Updated 2022-06-16Copy Reference Fork
9
1
2
3
4
5
6
7
8
9
›
⌄
with table1 as
(select distinct origin_from_address as the_stakers from ethereum.core.ez_token_transfers
where contract_address ilike '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' and symbol = 'stETH'
and from_address ilike '0x0000000000000000000000000000000000000000')
select origin_from_address, ifnull(sum(amount_out),0) - ifnull(sum(amount_in),0) as gain_or_loss
from ethereum.core.ez_dex_swaps
where SYMBOL_OUT = 'stETH' and SYMBOL_IN = 'WETH'
and origin_from_address in (select the_stakers from table1)
group by 1
Run a query to Download Data