SELECT
TOKEN_NAME as collection,
-- sum(sales_amount) as "total sales volume",
count(DISTINCT tx_id) as "the number of sales" ,
rank() over (order by count(DISTINCT tx_id) desc) as rank
FROM solana.core.fact_nft_sales
LEFT outer JOIN solana.core.dim_nft_metadata
ON solana.core.fact_nft_sales.mint = solana.core.dim_nft_metadata.mint
where marketplace = 'hyperspace'
AND not token_name is NULL
GROUP BY collection
ORDER by 3 asc
LIMIT 20