select a.nft_id, player, serial_number, moment_tier, count(*) as sales_num , sum(price) as total_price
from flow.core.ez_nft_sales as a
join (select * from flow.core.dim_allday_metadata) b
on (a.nft_id = b.nft_id and a.nft_collection = b.nft_collection)
where a.tx_succeeded = 'TRUE'
and current_date >= a.block_timestamp::date
group by 1, 2, 3, 4
order by 5 desc
limit 10