rajsUntitled Query
Updated 2023-01-13Copy Reference Fork
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
›
⌄
SELECT
address,
sum(amount) as amount,
sum(amount) / sum(sum(amount)) over () as cum_amount
FROM
(
SELECT
validator_address as address,
sum(amount) / pow(10,6) as amount
from osmosis.core.fact_staking
where tx_succeeded
and currency = 'uosmo'
and action = 'delegate'
group by 1
union all
SELECT
validator_address as address,
-sum(amount) / pow(10,6) as amount
from osmosis.core.fact_staking
where tx_succeeded
and currency = 'uosmo'
and action = 'undelegate'
group by 1
union all
SELECT
validator_address as address,
sum(amount) / pow(10,6) as amount
from osmosis.core.fact_staking
where tx_succeeded
and currency = 'uosmo'
and action = 'redelegate'
group by 1
Run a query to Download Data