cheeyoung-kekPolygon NFT 3
Updated 2022-07-16Copy 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
›
⌄
with polygon_nft as (
select
address,
address_name,
project_name
from polygon.core.dim_labels
where LABEL_TYPE='nft'
and (label_subtype = 'token_contract' or label_subtype = 'general_contract')
),
first_sales as (
SELECT
from_address,
min(block_timestamp::date) as min_date
from flipside_prod_db.polygon.udm_events a
join polygon_nft n on a.contract_address = n.address
group by 1
),
all_users as (select
from_address,
min(block_timestamp::date) as min_all_date
from flipside_prod_db.polygon.udm_events
group by 1)
select count(distinct n.from_address)
from first_sales n
join all_users a on a.min_all_date = n.min_date
where n.from_address =a.from_address
Run a query to Download Data