sepehrmhz8Untitled Query
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
select tb1.block_timestamp::date as date,case when block_timestamp::date>='2022-09-15' then 'After The Merge' else 'Before The Merge'end as event, count(distinct tx_hash) as tx, count(distinct origin_from_address) as users, sum(amount_usd) as volume,
'Deposit' as actions
from ethereum.core.ez_token_transfers as tb1
join ethereum.core.dim_dex_liquidity_pools as tb2 on tb1.to_address = tb2.pool_address and tb2.platform = 'sushiswap'
-- add
where origin_function_signature in ('0xf305d719','0xe8e33700')
and date >='2022-09-01' and date <current_date
union all
remove as (select tb1.block_timestamp::date as date,case when block_timestamp::date>='2022-09-15' then 'After The Merge' else 'Before The Merge'end as event
'Withdrawal ' as actions, sum(amount_usd) as volume_usd
from ethereum.core.ez_token_transfers as tb1
join ethereum.core.dim_dex_liquidity_pools as tb2 on tb1.from_address = tb2.pool_address and tb2.platform = 'sushiswap'
-- remove
where origin_function_signature in ('0xbaa2abde','0x02751cec','0x02751cec','0xded9382a','0x5b0d5984')
)
Run a query to Download Data