Sbhn_NPcircul 1
Updated 2023-01-21
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
33
34
35
36
›
⌄
--credit : https://app.flipsidecrypto.com/velocity/queries/a84b31f9-a341-4ce0-9558-d1a832be5479
with transfer_luna_from_user as (
select
sender as address,
- (sum(amount))/1e6 as amount
from terra.core.ez_transfers
where currency = 'uluna'
and tx_succeeded = true
group by address
),
transfer_luna_to_user as (
select
receiver as address,
(sum(amount))/1e6 as amount
from terra.core.ez_transfers
where currency = 'uluna'
and tx_succeeded = true
group by address
),
results_1 as (
select * from transfer_luna_from_user
union
select * from transfer_luna_to_user
),
results_2 as (
select
address as holder,
sum(amount) as amount_of_hold
from results_1
group by holder
having amount_of_hold > 0
)
select
sum(amount_of_hold) as "Circulating Supply",
count(holder) as "Number of Holder"
Run a query to Download Data