jackguyNFT holders on base
Updated 2023-08-03
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 tab1 as (
SELECT
contract_address --,
-- contract_name
-- date_trunc('day', block_timestamp) as day,
-- count(*) as mints,
-- count(DISTINCT decoded_log:to) as minters,
-- count(DISTINCT tx_hash) as mint_events
from base.core.ez_decoded_event_logs
WHERE decoded_log:from LIKE '0x0000000000000000000000000000000000000000'
and not decoded_log:tokenId is NULL
GROUP BY 1
)
SELECT
contract_address,
contract_name,
count(DISTINCT address) as holders --,
-- avg(NFT_bal) as avg_tokens
FROM (
SELECT
address,
contract_address,
contract_name,
count(CASE when tx like 'tx_in' then 1 end) - count(CASE when tx like 'tx_out' then 1 end) as NFT_bal
FROM (
SELECT
decoded_log:to as address,
'tx_in' as tx,
contract_address, --,
contract_name
FROM base.core.ez_decoded_event_logs
WHERE contract_address in (SELECT * from tab1)
Run a query to Download Data