SWAPS | TRADERS | VOLUME_USD | AVERAGE_AMOUNT_USD | MEDIAN_AMOUNT_USD | VOLUME | AVERAGE_AMOUNT | MEDIAN_AMOUNT | |
---|---|---|---|---|---|---|---|---|
1 | 158769 | 18495 | 44960206.4526107 | 174.539028287 | 9.18 | 5291575009.3277 | 20539.197266374 | 1115.004342874 |
Afonso_DiazTotal
Updated 2 days ago
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
pricet as (
select
hour::date as date,
avg(price) as token_price_usd
from
avalanche.price.ez_prices_hourly
where
token_address = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c'
group by 1
),
main as (
select
tx_hash,
block_timestamp,
iff(token_in = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c', amount_in, amount_out) as amount,
coalesce(amount_in_usd, amount_out_usd, amount * token_price_usd) as amount_usd,
origin_from_address as trader,
symbol_in,
symbol_out,
iff(token_in = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c', 'Sell', 'Buy') as trade_side
from
avalanche.defi.ez_dex_swaps
left join
pricet on block_timestamp::date = date
where
'0xb8d7710f7d8349a506b75dd184f05777c82dad0c' in (token_in, token_out)
)
select
count(distinct tx_hash) as swaps,
count(distinct trader) as traders,
sum(amount_usd) as volume_usd,
avg(amount_usd) as average_amount_usd,
Last run: 2 days ago
1
99B
4s