select buyer_address as unique_buyer,
sum(price_usd) as volume,
row_number() over (order by volume desc) as ranking
from optimism.core.ez_nft_sales s inner join optimism.core.dim_labels l on s.nft_address = l.address
where price_usd is not null and block_timestamp::date < current_date
and block_timestamp::date >= current_date - {{date_range}}
and project_name = {{nft_collection}}
group by unique_buyer order by volume desc limit 10