AMOUNT_USD_CATEGORY | TXN_COUNT | TOTAL_VOLUME_USD | |
---|---|---|---|
1 | $0-9 USD | 79795 | 403200.980770475 |
2 | $10-49 USD | 40593 | 1233939.90647322 |
3 | $100K+ USD | 1007 | 102963.432492212 |
4 | $50-99 USD | 13680 | 1106604.32094519 |
5 | $100-499 USD | 27773 | 7983181.14316073 |
6 | $500-999 USD | 9492 | 7766450.53499942 |
7 | $1K-4.9K USD | 9442 | 20732763.2737694 |
8 | $5K-9.9K USD | 596 | 3930060.12 |
9 | $10K-49.9K USD | 102 | 1645874.82 |
10 | $50K-99.9K USD | 1 | 55167.92 |
Afonso_DiazGrouping txns based on $USD
Updated 9 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,
date_trunc('month', block_timestamp) as trade_date
from avalanche.defi.ez_dex_swaps
left join pricet on block_timestamp::date = date
where '0xb8d7710f7d8349a506b75dd184f05777c82dad0c' in (token_in, token_out)
)
select
case
when amount_usd < 10 then '$0-9 USD'
when amount_usd between 10 and 49 then '$10-49 USD'
when amount_usd between 50 and 99 then '$50-99 USD'
when amount_usd between 100 and 499 then '$100-499 USD'
when amount_usd between 500 and 999 then '$500-999 USD'
when amount_usd between 1000 and 4999 then '$1K-4.9K USD'
when amount_usd between 5000 and 9999 then '$5K-9.9K USD'
when amount_usd between 10000 and 49999 then '$10K-49.9K USD'
when amount_usd between 50000 and 99999 then '$50K-99.9K USD'
Last run: 9 days ago
10
364B
4s