Query editor
with price_tb as(select *,(amount_usd/token_sold_amount) as pricefrom dex.tradeswhere token_sold_symbol = 'LOKA'union allselect *,(amount_usd/token_bought_amount) as pricefrom dex.tradeswhere token_bought_symbol = 'LOKA')selectdate_trunc('day', block_time) as dt,approx_percentile(price, 0.5) as pricefrom price_tbgroup by 1order by 1 desc