sarathsushimerge1
Updated 2022-10-03Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
with data1 as (select pool_name, 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'
where origin_function_signature in ('0xbaa2abde','0x02751cec','0x02751cec','0xded9382a','0x5b0d5984')
and block_timestamp::date >='2022-09-01' and block_timestamp::date <'2022-09-15'
group by 1),
data2 as (
select pool_name as pool, sum(amount_usd) as volume_usd_bfore
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'
where origin_function_signature in ('0xbaa2abde','0x02751cec','0x02751cec','0xded9382a','0x5b0d5984')
and block_timestamp::date >='2022-08-01' and block_timestamp::date <'2022-08-30'
group by 1
)
SELECT pool_name,volume_usd,volume_usd_bfore from data1 join data2 on data1.pool_name=data2.pool
Run a query to Download Data