ML6Common Sellers of Top5 and other Collections
Updated 2022-06-11Copy 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
33
›
⌄
with total_NFT_sales_volume as (select sum(price) as vol
from flow.core.fact_nft_sales )
, NFT_sales_volume_overtime as (select sum(price) as vol,to_date(block_timestamp::date)
from flow.core.fact_nft_sales
group by 2)
,nft_collections as (select sum(price) as vol,to_date(block_timestamp::date) as dt , nft_collection
from flow.core.fact_nft_sales
group by 2,3)
, top5_nft as (select top 5 sum(price) as vol, nft_collection
from flow.core.fact_nft_sales
group by 2
order by 1 DESC)
,total_buyer_top5 as (select count(distinct buyer) from flow.core.fact_nft_sales
where
nft_collection in (select nft_collection from top5_nft))
, common_buyerwallettop5_other as (select count(distinct buyer) from flow.core.fact_nft_sales
where
nft_collection in (select nft_collection from top5_nft)
and
buyer in (select distinct buyer from flow.core.fact_nft_sales
where
nft_collection not in (select nft_collection from top5_nft)))
,total_seller_top5 as (select count(distinct seller) from flow.core.fact_nft_sales
where
nft_collection in (select nft_collection from top5_nft))
, common_sellerwallettop5_other as (select count(distinct seller) from flow.core.fact_nft_sales
where
nft_collection in (select nft_collection from top5_nft)
and
seller in (select distinct seller from flow.core.fact_nft_sales
where
nft_collection not in (select nft_collection from top5_nft)))
select * from common_sellerwallettop5_other
Run a query to Download Data