mlhUntitled Query
Updated 2022-10-13
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 nfts as (
select
distinct project_name as collection,
address
from optimism.core.dim_labels
where project_name in ('optipunk', 'optimism', 'apetimism', 'optimistic explorer - get started nft', 'dope wars hustlers', 'mirror',
'motorheadz', 'optimistic apes', 'optichads', 'project galaxy')
order by project_name
),
sales as (
select
s.buyer_address as wallet,
n.collection
from optimism.core.ez_nft_sales s join nfts n on s.nft_address = n.address
group by wallet, collection
),
wallet_collections as (
select
wallet,
listagg(collection, ',') within group (order by collection asc) as collections
from sales
group by wallet
)
select
collections,
count(distinct wallet) as n_wallets
from wallet_collections
where ARRAY_SIZE(split(collections,',')) > 1
group by collections
Run a query to Download Data