cypherTerra2 dash - supply - total supply
Updated 2023-01-03
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
›
⌄
with t1 as
(select
date_trunc('day', block_timestamp) as date,
sum(AMOUNT) as sent, SENDER
from
terra.core.ez_transfers
WHERE
CURRENCY='uluna'
group by date, sender),
t2 as
(select
date_trunc('day', block_timestamp) as date,
sum(AMOUNT) as rec, RECEIVER
from
terra.core.ez_transfers
WHERE
CURRENCY='uluna'
group by date, receiver),
final as (select a.date, sum(rec)/1e4 as total_supply from t2 a left join t1 b on a.RECEIVER=b.SENDER and a.date=b.date
where sent is null
group by a.date)
select *, sum(total_supply) over (order by date asc rows between unbounded preceding and current row) as daily_total_supply
from final
Run a query to Download Data