select date_trunc('day', block_timestamp) as date,b.classification, sum(price) as amount
from flow.core.ez_nft_sales a
left join flow.core.dim_allday_metadata b
on a.nft_id = b.nft_id
where to_date(block_timestamp) between '2022-08-04' and '2022-08-24'
and a.nft_id is not null
and a.nft_collection is not null
and a.nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
and classification is not null
group by date, b.classification