RayyykOsmosis wallet balance 1
Updated 2022-10-26Copy 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
27
28
29
›
⌄
with table_1 as (select date as day,
sum(balance/pow (10,decimal)) as staked_osmo,
sum(staked_osmo) over (order by day) as cumu_staked_osmo
from osmosis.core.fact_daily_balances
where date >= '2022-01-01'
and balance_type = 'staked'
and balance > 0
and currency = 'uosmo'
group by 1),
table_2 as (select date as day,
sum(balance/pow (10,decimal)) as liquid_osmo,
sum(liquid_osmo) over (order by day) as cumu_liquid_osmo
from osmosis.core.fact_daily_balances
where date >= '2022-01-01'
and balance_type = 'liquid'
and balance > 0
and currency = 'uosmo'
group by 1)
select a.day,
staked_osmo,
liquid_osmo,
cumu_staked_osmo,
cumu_liquid_osmo,
liquid_osmo/staked_osmo as ratio
from table_1 a
join table_2 b on a.day = b.day
order by 1 desc
Run a query to Download Data