Query editor
select date, first_value(jooce_price) over (partition by jooce_count order by date asc) as jooce_price from(select a.date as date, jooce_price, count(jooce_price) over (order by a.date asc) as jooce_count from(select date_trunc('day',minute) as date from prices.usdwhere symbol = 'ETH' and minute >= cast('2025-01-16 00:00' as timestamp)group by date_trunc('day',minute)) as aleft join(select date_trunc('day',block_time) as date, avg(case when token_bought_symbol = 'JOOCE' then amount_usd / token_bought_amount else amount_usd / token_sold_amount end) as jooce_price from uniswap.tradeswhere blockchain = 'base' and token_pair = 'JOOCE-WETH' and (token_bought_address = 0x100ce3e3391c00b6a52911313a4ea8d23c8a38d8 or token_sold_address = 0x100ce3e3391c00b6a52911313a4ea8d23c8a38d8)group by date_trunc('day',block_time)) as b on a.date = b.date) as aorder by a.date asc