with raw as (SELECT md.play_type,
count(distinct s.nft_collection) as n_collection,
count(distinct s.nft_id) as n_unique_nft
FROM flow.core.dim_topshot_metadata md
INNER JOIN flow.core.fact_nft_sales s
ON md.nft_id=s.nft_id
group by 1)
select count(distinct play_type) as n_unique_play_type , sum(N_UNIQUE_NFT) as tot_n_unique_nft
from raw