Afonso_Diazsilky-pink
Updated 2024-09-16
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
aptos_swaps as (
select
tx_hash,
block_timestamp,
platform,
swapper,
symbol_in,
symbol_out,
iff(symbol_in = 'USDY', amount_in, amount_out) as amount_usd
from aptos.defi.ez_dex_swaps
where
'0xcfea864b32833f157f042618bd845145256b1bf4c0da34a7013b76e42daa53cc::usdy::USDY' in (token_out, token_out)
),
ethereum_swaps as (
select
tx_hash,
block_timestamp,
platform,
origin_from_address as swapper,
symbol_in,
symbol_out,
iff(symbol_in = 'USDY', amount_in, amount_out) as amount_usd
from ethereum.defi.ez_dex_swaps
where
'0x35e050d3c0ec2d29d269a8ecea763a183bdf9a9d' in (token_in, token_out)
)
select
count(distinct tx_hash) as transactions,
count(distinct swapper) as swappers,
sum(amount_usd) as volume_usd,
avg(amount_usd) as average_amount_usd
from ethereum_swaps
QueryRunArchived: QueryRun has been archived