Sbhn_NPReddit NFT Sales State
Updated 2022-10-30
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
›
⌄
--credit : 0xHaM☰d
WITH mint_tx as (
SELECT
block_timestamp,
tx_hash,
EVENT_INPUTS,
CONTRACT_ADDRESS,
EVENT_INPUTS:"_id"::string as token_Id,
EVENT_INPUTS:"_to"::string as to_address,
ROW_NUMBER() OVER (PARTITION BY to_address ORDER BY block_timestamp ASC) as rank
FROM polygon.core.FACT_EVENT_LOGS
WHERE 1=1
and event_name = 'TransferSingle'
and ORIGIN_FUNCTION_SIGNATURE IN ('0x669f5a51', '0x5a86c41a')
and EVENT_INPUTS:"_from" = '0x0000000000000000000000000000000000000000'
and TX_STATUS = 'SUCCESS'
QUALIFY rank = 1 -- Only look at the first mint tx, ignore 2nd onwards
)
SELECT
'Minter Wallets' as status,
COUNT(DISTINCT to_address) as Minter_Cnt
FROM mint_tx
UNION
SELECT
'Mint Count' as status,
COUNT(DISTINCT tx_hash) as Mint_Cnt
FROM mint_tx
UNION
SELECT
'Secondary Market Sallers' as status,
COUNT(DISTINCT EVENT_INPUTS:"_from") as Sallers_Cnt
FROM polygon.core.FACT_EVENT_LOGS
Run a query to Download Data