select
date_trunc('day',block_timestamp) as date,
count(distinct PURCHASER) as nft_buyr,
count(distinct seller) as nft_seller,
count(distinct tx_id) as tx_count,
sum(SALES_AMOUNT) as sale_amount,
avg(SALES_AMOUNT) as avg_sales_amount
from solana.core.fact_nft_sales
where SUCCEEDED = 'TRUE'
and block_timestamp >= CURRENT_DATE - 7
group by 1