select to_date(a.block_timestamp) as date, nft_collection, c.contract_name, a.currency, sum(price) as price from flow.core.ez_nft_sales a
left join flow.core.dim_contract_labels c
on a.nft_collection = c.event_contract
where TX_SUCCEEDED = 'TRUE'
group by to_date(a.block_timestamp) , nft_collection, c.contract_name, a.currency