SELECT
date_trunc('week', block_timestamp) AS date,
player,
sum(price) as sales_volume,
count(distinct tx_id) as sales_count
from flow.core.ez_nft_sales s join flow.core.dim_allday_metadata m on s.nft_id = m.nft_id and s.nft_collection = m.nft_collection
where
player = 'Justin Herbert' and
tx_succeeded = true and
s.nft_collection = 'A.e4cf4bdc1751c65d.AllDay' and
player is not null and
player != 'N/A' and
price is not null
group by 1, 2