Abolfazl_771025count of purchase
Updated 2022-08-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with table1 as (select
buyer_address,
count(distinct(tx_hash)) as count
from optimism.core.ez_nft_sales a join optimism.core.dim_labels b on a.nft_address = b.address
where platform_name = 'quixotic'
and event_type = 'sale'
group by 1
)
select
case
when count < 5 then 'Purchased less than 5'
when count BETWEEN 4 and 11 then 'Purchased 5 to 10'
when count BETWEEN 10 and 21 then 'Purchased 11 to 20'
else 'Purchased more than 20 NFTs'
end as category,
count(distinct(buyer_address)) as purchasers
from table1
group by 1
Run a query to Download Data