select date_trunc('day',a.block_timestamp) as day,
b.play_type,
count(distinct tx_id) as sales,
sum(price) as sales_volume
from
flow.core.fact_nft_sales a left join flow.core.dim_topshot_metadata b
on a.nft_id = b.nft_id
where play_type is not null
group by 1,2