SocioCryptoValidators Stats
Updated 2024-09-27
999
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
›
⌄
with delegate as (
SELECT
tx_id ,
ATTRIBUTE_VALUE as validator
FROM sei.core.fact_msg_attributes
WHERE ATTRIBUTE_KEY = 'validator' AND msg_type = 'delegate'
)
,
delegate_amount as (
SELECT
validator,
sum((split(ATTRIBUTE_VALUE, 'usei')[0])/1e6) as stake_amount
FROM sei.core.fact_msg_attributes a
INNER JOIN delegate b using(tx_id)
WHERE msg_type = 'delegate' AND ATTRIBUTE_KEY = 'amount'
GROUP BY 1
)
,
redelegate_to as (
SELECT
tx_id,
ATTRIBUTE_VALUE as validator
FROM sei.core.fact_msg_attributes
WHERE ATTRIBUTE_KEY = 'destination_validator' AND msg_type = 'redelegate'
)
,
redelegate_to_amount as (
SELECT
validator,
sum((split(ATTRIBUTE_VALUE, 'usei')[0])/1e6) as redelegate_amount_to
FROM sei.core.fact_msg_attributes
INNER JOIN redelegate_to b using(tx_id)
WHERE msg_type = 'redelegate' AND ATTRIBUTE_KEY = 'amount'
GROUP BY 1
)
QueryRunArchived: QueryRun has been archived