HosseinUntitled Query
Updated 2023-01-04
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 t as (
select
receiver as address,
-sum(amount::number/pow(10, 6)) as volume
from terra.core.ez_transfers
where currency = 'uluna'
and tx_succeeded = 1
and amount is not null
group by address
union all
select
sender as address,
sum(amount::number/pow(10, 6)) as volume
from terra.core.ez_transfers
where currency = 'uluna'
and tx_succeeded = 1
and amount is not null
group by address
)
select sum(total_balance) as circulation_supply from (
select address,
sum(volume::number) as total_balance
from t
group by address
having total_balance > 0
)
Run a query to Download Data