hessShare of New Collections and Old Collections Volume ( Whale Activties)
Updated 2022-06-15
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 whale as ( select purchaser , count(mint) as total_sales, sum(sales_amount) as total_amount
from solana.core.fact_nft_sales
group by 1
)
,
whales_address as (select DISTINCT purchaser
from whale
where total_sales > 50 and total_amount > 000)
,
mint as ( select block_timestamp as mint_date ,mint as new_nft
from solana.core.fact_nft_mints)
,
new_nft as ( select date(block_timestamp) as date , purchaser , count(DISTINCT(tx_id)) as new_sales, sum(sales_amount) as new_amount
from solana.core.fact_nft_sales a join mint b on a.mint = b.new_nft
where mint_date >= '2022-03-01' and purchaser in ( select purchaser from whales_address)
group by 1,2
order by 1)
,
old_nft as ( select date(block_timestamp) as date_ ,purchaser , count(DISTINCT(tx_id)) as old_sales, sum(sales_amount) as old_amount
from solana.core.fact_nft_sales a join mint b on a.mint = b.new_nft
where mint_date < '2022-03-01' and purchaser in ( select purchaser from whales_address)
group by 1,2
order by 1)
,
final as ( select date_ , sum(new_sales) as new_sale , sum(new_amount) as new_amounts, sum(old_sales) as old_sale, sum(old_amount) as old_amounts
from old_nft a left join new_nft b on a.date_ = b.date
group by 1
order by 1
)
select 'New Collections' as type , sum(new_sale) as total_sale ,sum(new_amounts) as total
from final
group by 1
UNION
select 'Old Collections' as type , sum(old_sale) as total_sale , sum(old_amounts) as total
from final
Run a query to Download Data