Pmisha-bmlMdxstake.90
Updated 2022-05-10
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
›
⌄
with t1 as (select
date as dt1,
sum(balance) as LunaCirculatingSupply,
count(distinct address) as unique_address
from terra.daily_balances
where date >= CURRENT_DATE - interval '90 days'
and currency = 'LUNA'
and address_label_type is NULL
group by 1
order by 1),
t2 as (SELECT
date as dt2,
sum(balance) as stakedLuna,
count(distinct address) as unique_address
from terra.daily_balances
where date >= CURRENT_DATE - interval '90 days'
and currency = 'LUNA'
and balance_type='staked'
and address_label_type is NULL
group by 1
order by 1)
select t1.dt1 as dt,
LunaCirculatingSupply,
stakedLuna,
stakedLuna/LunaCirculatingSupply*100 as Percent_staked
from t1 inner join t2 on t1.dt1=t2.dt2
Run a query to Download Data