rajsTerra Stablecoin Swaps
Updated 2022-12-21
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 usdc_sells as
(
select
-- *
date_trunc('week', block_timestamp) as s_date,
-- 'axlUSDC' as stablecoin_sold,
-sum(from_amount / pow(10,from_decimal)) as usdc_amount_sold,
-count(distinct trader) as no_of_usdc_sellers,
-count(*) as no_of_usdc_sells
from terra.core.ez_swaps
where from_currency in ('ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4')
group by 1
)
,
usdc_buys as
(
select
-- *
date_trunc('week', block_timestamp) as b_date,
-- 'axlUSDC' as stablecoin_bought,
sum(to_amount / pow(10,to_decimal)) as usdc_amount_bought,
count(distinct trader) as no_of_usdc_buyers,
count(*) as no_of_usdc_buys
from terra.core.ez_swaps
where to_currency in ('ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4')
group by 1
)
,
usdt_sells as
(
select
-- *
date_trunc('week', block_timestamp) as ts_date,
-- 'axlUSDC' as stablecoin_sold,
Run a query to Download Data