Pmisha-bmlMdxcirc.30
Updated 2022-05-09
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
›
⌄
with prc as (
select
date_trunc('day',block_timestamp) as dt2,
avg(price_usd) as luna_price
from terra.oracle_prices
where SYMBOL='LUNA'
and block_timestamp>= CURRENT_DATE - interval '30 days'
group by 1
),
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 '30 days'
and currency = 'LUNA'
and address_label_type is NULL
group by 1
order by 1)
select
t1.dt1 as dt,
LunaCirculatingSupply,
luna_price,
luna_price*LunaCirculatingSupply as Market_cap
from t1
inner join prc on t1.dt1=prc.dt2
Run a query to Download Data