freemartianDelegation Categories Adjusted
Updated 2023-05-10
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 delegatees AS (
SELECT
decoded_log:delegatee AS Delegatee,
count(distinct decoded_log:delegator) AS delegated_wallets
FROM ethereum.core.fact_decoded_event_logs l
LEFT JOIN crosschain.core.ez_ens dl on dl.owner = l.decoded_log:delegatee
WHERE contract_address = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
AND event_name in ('DelegateChanged')
GROUP BY delegatee
HAVING delegated_wallets > 2
)
SELECT
count(Delegatee) AS Delegatee_count,
CASE
when delegated_wallets <= 2 then '1 or 2 Delegated Wallets'
when delegated_wallets <= 6 AND delegated_wallets > 2 then '3 to 6 Delegated Wallets'
when delegated_wallets <= 12 AND delegated_wallets > 6 then '7 to 12 Delegated Wallets'
when delegated_wallets <= 20 AND delegated_wallets > 12 then '13 to 20 Delegated Wallets'
when delegated_wallets <= 40 AND delegated_wallets > 20 then '21 to 40 Delegated Wallets'
when delegated_wallets <= 100 AND delegated_wallets > 40 then 'More than 41 Delegated Wallets'
end AS Governance_attraction
FROM delegatees
GROUP BY 2
Run a query to Download Data