RayyykOP Early Optimists NFT 4
Updated 2022-10-27Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with table_1 as (select buyer_address,
count(distinct(tx_hash)) as purchase_count
from optimism.core.ez_nft_sales
where event_type = 'sale'
and nft_address = '0x0110bb5739a6f82eafc748418e572fc67d854a0f'
and price_usd > 0
and price_usd < 999999999
group by 1)
select case
when purchase_count = 1 then 'Purchased Once'
when purchase_count > 1 and purchase_count <= 5 then 'Purchased 2 to 5'
when purchase_count > 5 and purchase_count <= 10 then 'Purchased 6 to 10'
else 'More than 10 Purchases'
end as purchases,
count(distinct(buyer_address)) as wallet_count,
(select avg(purchase_count) from table_1) as avg_purchase_count
from table_1
group by 1
Run a query to Download Data