LTirrell18. Wealth distribution
Updated 2021-11-16
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
›
⌄
-- 18. What is the distribution of wealth within the THORChain ecosystem? Show a histogram of the breakdown
with to_addresses as (
select
to_address as address,
sum(rune_amount) as amount
from
thorchain.transfers
where block_timestamp::date>current_date-30
group by
to_address
),
from_addresses as (
select
from_address as address,
sum(rune_amount) as amount
from
thorchain.transfers
where block_timestamp::date>current_date-30
group by
from_address
)
select
t.address as address,
t.amount as rune_in,
f.amount as rune_out,
t.amount - f.amount as total
from
to_addresses t
inner join from_addresses f on t.address = f.address
order by
4
Run a query to Download Data