select
block_timestamp::date as date,
collection_name,
sum(total_sales_amount) as Algo_volume,
sum(number_of_nfts) as sales
from
algorand.nft.ez_nft_sales
where
nft_marketplace = 'rand gallery'
and collection_name is not null
and block_timestamp > current_date - {{param_1}}
group by
date,
collection_name
order by
date