Query editor
with trades as(selectblock_number,block_time,question,token_outcome,price,amount,sharesfrom polymarket_polygon.market_tradeswhere polymarket_link like '%btc-updown-15m%'and block_time >=date_add('day', -9, current_date))select question,token_outcome,date_trunc('minute', block_time) as trade_time,sum(amount) / sum(shares) as avg_pricefrom tradesgroup by 1, 2, 3