select BLOCK_TIMESTAMP::date as date, sum(PRICE) as volume,
case
when BLOCK_TIMESTAMP>='2022-05-17' and BLOCK_TIMESTAMP<='2022-05-29' then 'During NBA Conference Finals'
when BLOCK_TIMESTAMP<'2022-05-17' then 'Before NBA Conference Finals'
when BLOCK_TIMESTAMP>'2022-05-29' then 'After NBA Conference Finals'
end as tag
from flow.core.fact_nft_sales a
join flow.core.dim_topshot_metadata b
on a.NFT_COLLECTION=b.NFT_COLLECTION and a.NFT_ID=b.NFT_ID
where BLOCK_TIMESTAMP>='2022-05-04' and BLOCK_TIMESTAMP<='2022-06-11'
group by date, tag