with prices as (
select
date(timestamp) as day,
avg(price_usd) as priceusd
from
flow.core.fact_prices
where
token='Flow'
group by
1
), daily_stat as (
select
date(block_timestamp) as day,
PRICE,
round(log(2, PRICE)) as pri
from
flow.core.ez_nft_sales s join prices p on date(block_timestamp)=p.day
where
nft_collection = 'A.e4cf4bdc1751c65d.AllDay' and TX_SUCCEEDED
)
select
day, PRICE
-- ,
-- concat(lpad(pow(2,pri),7,'0'),pri,' Flow') as p,
-- count(*) as cnt
from
daily_stat
-- group by pri
order by day asc