hessTotal Holder Vs. Total Voter
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
›
⌄
with nft_holder as ( select nft_from_address
from ethereum.core.ez_nft_transfers
where nft_address = lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B')
)
,
nft_sales as ( select seller_address
from ethereum.core.ez_nft_sales
where nft_address = lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B'))
,
real_holder as ( select count(DISTINCT(nft_to_address)) as total
from ethereum.core.ez_nft_transfers
where nft_to_address not in ( select nft_from_address from nft_holder)
and nft_to_address not in ( select seller_address from nft_sales)
and nft_address = lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B'))
,
voter as ( select count(DISTINCT(ORIGIN_FROM_ADDRESS)) as total
from ethereum.core.fact_event_logs
where contract_address = '0x5d2c31ce16924c2a71d317e5bbfd5ce387854039' and event_name = 'VoteCast' and event_removed = 'false'
and tx_status = 'SUCCESS')
select 'NFT holders' as type , total
from real_holder
UNION
select 'Voter' as type , total
from voter
Run a query to Download Data