jkhuhnke11AAVE - Delegated AAVE By Number of Votes
Updated 2023-05-13
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 monthly_v AS (
SELECT
voter,
voting_power AS vp,
count(*) as num_votes
FROM ethereum.core.ez_snapshot
WHERE space_id = 'aave.eth'
GROUP BY voter, voting_power
UNION ALL
SELECT
voter,
voting_power / POW(10, 18) AS vp,
count(*) as num_votes
FROM ethereum.aave.ez_votes
GROUP BY voter, voting_power
),
bals AS (
SELECT
voter,
sum(vp) as vp,
sum(num_votes) as num_votes
FROM monthly_v
GROUP BY voter
),
voted AS (
SELECT
sum(vp) AS vt
FROM bals
WHERE num_votes = 1
),
last_30 AS (
SELECT
sum(vp) as l30
FROM bals
Run a query to Download Data