with id as (select block_timestamp as t, tx_id, nft_id as nid,buyer, seller ,currency, price from flow.core.ez_nft_sales
where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'),
b as (select * from flow.core.dim_allday_metadata),
c as (select id.*, b.* from id inner join b on id.nid=b.NFT_id)
select date(t) as dt,MOMENT_TIER, avg(price) as avg_sales_price from c
where currency='A.ead892083b3e2c6c.DapperUtilityCoin'
group by 1,2
limit 1000