ArioUser Behavior (redux) - 5 - ratio swap fee
Updated 2022-10-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with Eth_swap_tx as (
select
distinct tx_hash
from ethereum.sushi.ez_swaps
where 1=1
and BLOCK_TIMESTAMP >= CURRENT_DATE - 30
)
,Ethereum_swap_fee as (
select
avg(TX_FEE) as "Ethereum-AVG-Swap_Fee"
from ethereum.core.fact_transactions
where 1=1
and STATUS = 'SUCCESS'
and tx_hash in (select * from Eth_swap_tx)
and block_timestamp >= CURRENT_DATE - 30
)
,OP_swap_tx as (
select
distinct tx_hash
from Optimism.sushi.ez_swaps
where 1=1
and BLOCK_TIMESTAMP >= CURRENT_DATE - 30
)
,Optimism_swap_fee as (
select
avg(TX_FEE) as "Optimism-AVG-Swap_Fee"
from Optimism.core.fact_transactions
where 1=1
and STATUS = 'SUCCESS'
and tx_hash in (select * from Op_swap_tx)
and block_timestamp >= CURRENT_DATE - 30
)
select *,
"Ethereum-AVG-Swap_Fee"/"Optimism-AVG-Swap_Fee" as Ratio
from Ethereum_swap_fee join Optimism_swap_fee
Run a query to Download Data