banbannardCopy of Avalanche Free Square Question 5
Updated 2022-07-31
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 base2 as (select tx_hash
from Gnosis.core.fact_event_logs
where event_name = 'Swap'
--and origin_to_address in (select address from base)
and block_timestamp >= '2022-06-15'),
base3 as (select tx_hash,
avg(event_inputs:value/1e6) as swap_size
from Gnosis.core.fact_event_logs
where (contract_address ilike '0x44fa8e6f47987339850636f88629646662444217')
and event_name = 'Transfer'
and tx_hash in (select tx_hash from base2)
and event_inputs:value > 0
group by 1),
base12 as (select tx_hash
from ethereum.core.fact_event_logs
where event_name = 'Swap'
--and origin_to_address in (select address from base1)
and block_timestamp >= '2022-06-15'),
base13 as (select tx_hash,
avg(event_inputs:value/1e6) as swap_size
from ethereum.core.fact_event_logs
where contract_address ilike '0x6b175474e89094c44da98b954eedeac495271d0f'
and event_name = 'Transfer'
and tx_hash in (select tx_hash from base12)
and event_inputs:value > 0
group by 1)
select
avg(swap_size),
'Average Swap Size on Ethereum'
from base13
union
select
Run a query to Download Data