select sales.block_timestamp::date as fecha,
sales.program_id,
count (distinct sales.purchaser) as unique_purchasers,
sum (sales.sales_amount) as daily_volumen
from solana.fact_nft_sales sales
inner join solana.dim_nft_metadata metadata
on sales.mint = metadata.mint
where metadata.contract_name = 'DeGods'
and sales.marketplace like 'magic%'
and fecha >= '2022-01-01'
group by fecha, 2
order by fecha