With metadata as (
Select PLAY_TYPE as Type, NFT_ID as NFT
From flow.core.dim_topshot_metadata
),
nft_sales as (
Select NFT_ID as NFT, PRICE as Vol,TX_ID as Tx
From flow.core.fact_nft_sales
where nft_collection='A.0b2a3299cc857e29.TopShot' and TX_SUCCEEDED='TRUE'
)
Select a.type, SUM (b.Vol) as total_volume,
Count (distinct b.Tx) as Total_Tx
From metadata a INNER JOIN nft_sales b on a.NFT=b.NFT
GROUP BY 1
order by 2 desc