Query editor
WITH blob_txs AS (SELECTbs.tx_hash,bs.block_time,bs.block_number,bs.tx_value,bs.blob_count,bs.blob_gas_used,bs.blob_base_fee,bs.max_fee_per_blob_gas,bs.blob_submitter,bs.blob_submitter_label,tx.gas_used,tx.gas_price,tx.type AS tx_type,b.base_fee_per_gas AS block_base_fee_per_gasFROM ethereum.blobs_submissions bsJOIN ethereum.transactions txON bs.tx_hash = tx.hashJOIN ethereum.blocks bON tx.block_number = b.numberWHERE bs.blob_submitter_label IN ({{blob_submitters}})AND bs.block_time >= now() - interval {{number_of_days}} day),eth_prices AS (SELECTdate_trunc('minute', minute) AS minute,priceFROM prices.usdWHERE symbol = 'ETH' AND contract_address IS NULLAND minute >= now() - interval {{number_of_days}} day),base_data AS (SELECTbt.*,ep.price AS eth_price,-- 21k minimum gas breakdown(21000 * bt.block_base_fee_per_gas / 1e18) AS min_gas_base_fee_eth,(21000 * (bt.gas_price - bt.block_base_fee_per_gas) / 1e18) AS min_gas_priority_fee_eth,(21000 * bt.gas_price / 1e18) AS min_gas_total_fee_eth,-- Total execution fee breakdown(bt.gas_used * bt.block_base_fee_per_gas / 1e18) AS exec_base_fee_eth,(bt.gas_used * (bt.gas_price - bt.block_base_fee_per_gas) / 1e18) AS exec_priority_fee_eth,(bt.gas_used * bt.gas_price / 1e18) AS total_exec_fee_eth,-- Blob gas fee(bt.blob_gas_used * bt.blob_base_fee / 1e18) AS blob_gas_fee_eth,-- Total fees((bt.gas_used * bt.gas_price + bt.blob_gas_used * bt.blob_base_fee) / 1e18) AS total_fee_eth,-- USD equivalents for 21k gas(21000 * bt.block_base_fee_per_gas / 1e18 * ep.price) AS min_gas_base_fee_usd,(21000 * (bt.gas_price - bt.block_base_fee_per_gas) / 1e18 * ep.price) AS min_gas_priority_fee_usd,(21000 * bt.gas_price / 1e18 * ep.price) AS min_gas_total_fee_usd,-- USD equivalents for total execution(bt.gas_used * bt.block_base_fee_per_gas / 1e18 * ep.price) AS exec_base_fee_usd,(bt.gas_used * (bt.gas_price - bt.block_base_fee_per_gas) / 1e18 * ep.price) AS exec_priority_fee_usd,(bt.blob_gas_used * bt.blob_base_fee / 1e18 * ep.price) AS blob_gas_fee_usd,((bt.gas_used * bt.gas_price + bt.blob_gas_used * bt.blob_base_fee) / 1e18 * ep.price) AS total_fee_usdFROM blob_txs btLEFT JOIN eth_prices epON date_trunc('minute', bt.block_time) = ep.minute