Sbhn_NPterra swap
Updated 2023-01-22
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
›
⌄
select
date_trunc('hour',BLOCK_TIMESTAMP) as date,
'From $LUNA' as swap_type,
count(distinct tx_id) as swaps,
count(distinct TRADER) as swappers,
sum(FROM_AMOUNT/pow(10,from_decimal)) as volume,
avg(FROM_AMOUNT/pow(10,from_decimal)) as avg_volume
from terra.core.ez_swaps
where block_timestamp between '2023-01-09' and '2023-01-10'
and FROM_CURRENCY='uluna'
and TX_SUCCEEDED=TRUE
and from_amount < 1e8
group by 1
union all
select
date_trunc('hour',BLOCK_TIMESTAMP) as date,
'To $LUNA' as swap_type,
count(distinct tx_id) as swaps,
count(distinct TRADER) as swappers,
sum(TO_AMOUNT/pow(10,to_decimal)) as volume,
avg(TO_AMOUNT/pow(10,to_decimal)) as avg_volume
from terra.core.ez_swaps
where block_timestamp between '2023-01-09' and '2023-01-10'
and to_CURRENCY='uluna'
and TX_SUCCEEDED=TRUE
and to_amount < 1e8
group by 1
Run a query to Download Data