Moeavprc0
Updated 2023-02-18Copy Reference Fork
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 prices as (
select
date_trunc('day',RECORDED_HOUR) as date,
avg(close) as "AVAX price"
from
crosschain.core.fact_hourly_prices
where id like 'wrapped-avax'
and date >= CURRENT_DATE - 60
group by 1
order by 1
)
select
"AVAX price" price,
BLOCK_TIMESTAMP::date date ,
sum (AMOUNT_IN) as swap_volume ,
sum (AMOUNT_IN * price ) as swap_volume_usd ,
count ( distinct SENDER) as swappers ,
count ( distinct tx_hash) as swaps
from
avalanche.sushi.ez_swaps s
inner join prices on date = BLOCK_TIMESTAMP::date
where SYMBOL_IN ilike '%avax%'
group by 1,2
Run a query to Download Data