0-MIDdex
Updated 2023-07-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
select date_trunc('month',BLOCK_TIMESTAMP)as month
,sum(case when FROM_CURRENCY='uosmo' then FROM_AMOUNT/1e6 end) as sell_volume
,sum(case when TO_CURRENCY='uosmo' then TO_AMOUNT/1e6 end) as buy_volume
,count(distinct case when FROM_CURRENCY='uosmo' then TRADER end) as sellers
,count(distinct case when TO_CURRENCY='uosmo' then TRADER end) as buyers
,count(distinct case when FROM_CURRENCY='uosmo' then TX_ID end) as sell_count
,count(distinct case when TO_CURRENCY='uosmo' then TX_ID end) as buy_count
,sell_volume+buy_volume as volume
,sellers+buyers as traders
,sell_count+buy_count as trades
,sum(volume)over(order by month) as "Volume Growth"
,sum(traders)over(order by month) as "Trader Growth"
,sum(trades)over(order by month) as "Trade Growth"
from osmosis.core.fact_swaps
where TX_SUCCEEDED='true'
group by 1
Run a query to Download Data