messarisolana nakamoto coefficients
Updated 2025-01-05
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
›
⌄
WITH
TotalStake AS (
SELECT EPOCH, SUM(ACTIVE_STAKE) as TOTAL_STAKE
FROM solana.gov.fact_validators
WHERE active_stake > 0 and delinquent = False
GROUP BY EPOCH
),
TotalCountryStake AS (
SELECT EPOCH,
SPLIT_PART(DATA_CENTER_KEY, '-', 2) as COUNTRY,
SUM(ACTIVE_STAKE) as TOTAL_STAKE
FROM solana.gov.fact_validators
WHERE active_stake > 0 and delinquent = False
GROUP BY EPOCH, COUNTRY
),
TotalDataCenterStake AS (
SELECT EPOCH,
DATA_CENTER_KEY,
SUM(ACTIVE_STAKE) as TOTAL_STAKE
FROM solana.gov.fact_validators
WHERE active_stake > 0 and delinquent = False
GROUP BY EPOCH, DATA_CENTER_KEY
),
RankedNodes AS (
SELECT EPOCH, NODE_PUBKEY, ACTIVE_STAKE,
ROW_NUMBER() OVER(PARTITION BY EPOCH ORDER BY ACTIVE_STAKE DESC) as RANK,
SUM(ACTIVE_STAKE) OVER(PARTITION BY EPOCH ORDER BY ACTIVE_STAKE DESC) AS ACCUMULATED_STAKE
FROM solana.gov.fact_validators
WHERE active_stake > 0 and delinquent = False
),
RankedCountries AS (
SELECT tcs.EPOCH, tcs.COUNTRY, tcs.TOTAL_STAKE,
ROW_NUMBER() OVER(PARTITION BY tcs.EPOCH ORDER BY tcs.TOTAL_STAKE DESC) as RANK,
SUM(tcs.TOTAL_STAKE) OVER(PARTITION BY tcs.EPOCH ORDER BY tcs.TOTAL_STAKE DESC) AS ACCUMULATED_STAKE
FROM TotalCountryStake tcs
),
QueryRunArchived: QueryRun has been archived