Query editor
with execs as (selectevt_block_time,keeperId as keeper,compensation/1e18 as compensation_POL,jobKey as job,evt_tx_hashfrom powerpool_polygon.PPAgentV2VRF_evt_Executewhere contract_address = 0xcdf80c73640a756d0810baba52f3d01280e5be32 --0x20D4029c783D5c9f47569940c656Af4189e53799--and evt_block_time >= current_timestamp - interval '30' day),txs as (selecthash, gas_price*gas_used/1e18 as tx_fee_POL--gas_limit,gas_price,gas_used,max_fee_per_gas,max_priority_fee_per_gas,priority_fee_per_gasfrom polygon.transactionswhere hash in (select evt_tx_hash from execs))--,--main as (selecte.evt_block_time,e.keeper,e.compensation_POL-t.tx_fee_POL as keeper_earned,--gas_price*149600/1e18 as overhead_part,e.compensation_POL,t.tx_fee_POL,--gas_price as base_fee,--gas_limit,gas_price,gas_used,max_fee_per_gas,max_priority_fee_per_gas,priority_fee_per_gas,e.job,e.evt_tx_hashfrom execs eleft join txs t on t.hash = e.evt_tx_hashorder by 1 desc/*)selectapprox_percentile(keeper_earned, array[0.1, 0.5, 0.9]) as keeper_earned,approx_percentile(compensation_POL, array[0.1, 0.5, 0.9]) as compensation_POL,approx_percentile(tx_fee_POL, array[0.1, 0.5, 0.9]) as tx_fee_POLfrom main*/