freemartianVoters Holdings and Activity
Updated 2022-06-21Copy 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
›
⌄
with receive as (
select nft_to_address as receiver, count(nft_to_address) as positive_number
from ethereum.core.ez_nft_transfers
where nft_address = lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B')
group by receiver
),
send as (
select nft_from_address as sender, count(nft_from_address) as negative_number
from ethereum.core.ez_nft_transfers
where nft_address = lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B')
group by sender
),
seller as (
select sender as wallet, positive_number - negative_number as holdings
from receive inner join send on receiver = sender
where holdings > 0
),
holders as (
select wallet, holdings
from seller
UNION
select receiver as address, positive_number as holdings
from receive
where receiver not in (select sender from send)
),
voters as (
select event_inputs:voter as voter, COUNT(*) as votes
from ethereum.core.fact_event_logs
where ORIGIN_TO_ADDRESS = LOWER('0x5d2C31ce16924C2a71D317e5BbFd5ce387854039')
and event_name = 'VoteCast'
group by voter
)
SELECT
(case
Run a query to Download Data