with top_3 as ( select project_name ,sum(price_usd) as total_sale
from ethereum.core.ez_nft_sales
where PLATFORM_NAME = 'nftx'
and event_type = 'redeem' and
block_timestamp::date >= current_date - 60
group by 1
order by 2 desc
limit 3)
select date(block_timestamp) as date ,project_name ,
count(DISTINCT(tx_hash)) as total_sales,
count(DISTINCT(SELLER_ADDRESS)) as total_seller,
count(DISTINCT(buyer_address)) as total_buyer , sum(price_usd) as total_sales
from ethereum.core.ez_nft_sales
where project_name in ( select project_name from top_3)
and block_timestamp::date >= current_date - 60
and PLATFORM_NAME = 'nftx' and event_type = 'redeem'
group by 1,2
order by 1