with NFallDay as (
select EVENT_CONTRACT, CONTRACT_NAME
from flow.core.dim_contract_labels
where contract_name ='AllDay'
group by 1,2
)
select count (distinct tx_id) num_sales,
count (distinct nft_id) num_traderd_nfts,
count (distinct buyer) num_buyers,
count (distinct seller) num_sellers,
sum (price) volume,
min (price) min_sale_price,
max (price) max_sale_price,
avg (price) average_volume,
median (price) median_sale_price
from flow.core.ez_nft_sales
where NFT_COLLECTION in (select EVENT_CONTRACT from NFallDay )
and tx_succeeded = 'TRUE'