Query editor
with execs as (selectevt_block_time,keeperId as keeper,compensation/1e18 as compensation_ETH,jobKey as job,evt_tx_hashfrom powerpool_ethereum.PPAgentV2_evt_Executewhere contract_address = 0xc9ce4cda5897707546f3904c0ffcc6e429bc4546and evt_block_time >= current_timestamp - interval '30' day),txs as (select hash, gas_price*gas_used/1e18 as tx_fee_ETH,gas_limit, gas_price, gas_used, max_fee_per_gas, max_priority_fee_per_gas, priority_fee_per_gasfrom ethereum.transactionswhere hash in (select evt_tx_hash from execs))--,--main as (selecte.evt_block_time,e.keeper,gas_price/1e9 as gas_price_gwei,(gas_price-max_priority_fee_per_gas)*149600/1e18 as overhead_part,e.compensation_ETH-t.tx_fee_ETH as keeper_earned,e.compensation_ETH,t.tx_fee_ETH,t.tx_fee_ETH*1e9 as tx_fee_gwei,gas_used,(gas_price-max_priority_fee_per_gas)/1e9 as base_fee,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_ETH, array[0.1, 0.5, 0.9]) as compensation_ETH,approx_percentile(tx_fee_gwei, array[0.1, 0.5, 0.9]) as tx_fee_gwei--approx_percentile(gas_price_gwei, array[0.1, 0.5, 0.9]) as gas_price_gwei,--approx_percentile(gas_used, array[0.1, 0.5, 0.9]) as gas_usedfrom main*/