Query editor
SELECTdate_trunc('day', d.block_date) AS day,-- tx countCOUNT(*) AS tx_count,-- gas priceavg(gas_price) as avg_gas_price,approx_percentile(gas_price, 0.5) as median_gas_price,approx_percentile(gas_price, 0.95) as p95_gas_price,-- tx feeavg(tx_fee) as avg_tx_fee,approx_percentile(tx_fee, 0.5) as median_tx_fee,approx_percentile(tx_fee, 0.95) as p95_tx_fee,-- base feeavg(TRY(CAST(tx_fee_breakdown['base_fee'] AS double))) as avg_base_fee,approx_percentile(TRY(CAST(tx_fee_breakdown['base_fee'] AS double)), 0.5) as median_base_fee,approx_percentile(TRY(CAST(tx_fee_breakdown['base_fee'] AS double)), 0.95) as p95_base_fee,-- priority feeavg(TRY(CAST(tx_fee_breakdown['priority_fee'] AS double))) as avg_priority_fee,approx_percentile(TRY(CAST(tx_fee_breakdown['priority_fee'] AS double)), 0.5) as median_priority_fee,approx_percentile(TRY(CAST(tx_fee_breakdown['priority_fee'] AS double)), 0.95) as p95_priority_feeFROM gas.fees gJOIN dex.trades dON d.blockchain = g.blockchainAND d.tx_hash = g.tx_hashWHERE d.blockchain = 'base'AND d.block_month >= TIMESTAMP '2025-01-01'GROUP BY 1ORDER BY 1