hessTotal Swaps
Updated 2023-06-09
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
›
⌄
with swap_from as ( select case when token_in = '0x68327a91e79f87f501bc8522fc333fb7a72393cb' then 'From AUX'
else 'Swap Form AGX' end as label,
count(DISTINCT(tx_hash)) as total_tx, count(DISTINCT(origin_from_address)) as total_user,
sum(amount_in_usd) as volume, avg(amount_in_usd) as avg_volume, max(amount_in_usd) as max_volume,
min(amount_in_usd) as min_volume
from avalanche.core.ez_dex_swaps
where token_in in ('0x68327a91e79f87f501bc8522fc333fb7a72393cb','0x13e7bcefdde72492e656f3fa58bae6029708e673')
group by 1)
,
swap_to as ( select case when token_out = '0x68327a91e79f87f501bc8522fc333fb7a72393cb' then 'To AUX'
else 'Swap To AGX' end as label,
count(DISTINCT(tx_hash)) as total_tx, count(DISTINCT(origin_from_address)) as total_user,
sum(amount_in_usd) as volume, avg(amount_in_usd) as avg_volume, max(amount_in_usd) as max_volume,
min(amount_in_usd) as min_volume
from avalanche.core.ez_dex_swaps
where token_out in ('0x68327a91e79f87f501bc8522fc333fb7a72393cb','0x13e7bcefdde72492e656f3fa58bae6029708e673')
group by 1)
select *
from swap_from
UNION
select *
from swap_to
Run a query to Download Data