adriaparcerisasget all owners of nft from nft collection x
Updated 2024-08-02
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
mints as (
select
distinct proposer as user,
sum(1) as nft_minted
from flow.core.fact_events x
join flow.core.dim_contract_labels y on x.event_contract=y.event_contract
join flow.core.fact_transactions z on x.tx_id=z.tx_id
where y.event_contract ilike '%{{collection}}%' and event_type='Mint'
and z.tx_succeeded = true
group by 1
),
buys as (
select
distinct event_data:buyer as user,
count(distinct tx_id) as nft_bought
from flow.core.fact_events s
where
tx_succeeded = true and event_type='ListingCompleted'
and event_data:nftType ilike '%{{collection}}%'
and event_data:buyer is not null and event_data:salePrice is not null
and event_data:purchased= 'true'
group by 1
),
sales as (
select
distinct event_data:storefrontAddress as user,
count(distinct tx_id) as nft_sold
from flow.core.fact_events s
where
tx_succeeded = true and event_type='ListingCompleted'
and event_data:nftType ilike '%{{collection}}%'
and event_data:buyer is not null and event_data:salePrice is not null
and event_data:purchased= 'true'
group by 1
)
QueryRunArchived: QueryRun has been archived