Query editor
with pre_result as (selectr.*, ltfrom (select * from query_3708851 -- gearbox weth mainnetunion allselect * from query_4032330 -- gearbox weth arbunion allselect * from query_4033725 -- gearbox weth optunion allselect * from query_3710556 -- USDC mainnetunion allselect * from query_4033710 -- USDC Arbitrumunion allselect * from query_4120014 -- WBTC Mainnet) r, query_4116728 ltwhere r.token = lt.tokenand r.chain = lt.chainand r.hour >= timeand r.hour < next_set_timeand r.hour > current_date - interval '6' month)selectdate_trunc('day',hour) hour,token,ticker,market,chain,lt,approx_percentile(base_rate, 0.5) base_rate,approx_percentile(quota_rate, 0.5) quota_ratefrompre_resultgroup by 1,2,3,4,5,6