Ali3NAverage Hourly Volume of Terra Transfers & Price OverView Since January 2023
Updated 2023-01-12
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
›
⌄
with lunapricet as (
select date_trunc (hour,block_timestamp) as date1,
median (to_amount/from_amount) as LUNA_Price
from terra.core.ez_swaps
where from_currency = 'uluna'
and to_currency = 'ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4'
and to_amount < 1e8 and from_amount < 1e8
and block_timestamp >= '2023-01-01'
group by 1 having LUNA_Price < 2 and LUNA_Price > 1.22 and LUNA_Price != 1.333487
order by 1),
maintable as (
select date_trunc(hour,block_timestamp) as date,
case when block_timestamp::date = '2023-01-09' then '9 January'
else 'Other Days' end as timespan,
LUNA_Price,
count (distinct tx_id) as TX_Count,
sum (amount) as Volume,
avg (amount) as Average_Volume
from terra.core.ez_transfers t1 join lunapricet t2 on date_trunc(hour,t1.block_timestamp) = t2.date1
where block_timestamp::Date >= '2023-01-01'
and currency = 'uluna'
and tx_succeeded = 'TRUE'
group by 1,2,3)
select timespan,
avg (tx_count) as Average_Transfers_Count,
avg (volume) as Average_Transfers_Volume
from maintable
group by 1
Run a query to Download Data