check_skedCumulative MEV (Monthly)
    Updated 2023-08-31
    WITH blocks AS (
    SELECT
    block_number,
    miner
    FROM ethereum.core.fact_blocks
    ),

    transaction AS (
    SELECT
    block_number,
    from_address,
    to_address,
    eth_value,
    position
    FROM ethereum.core.fact_transactions
    WHERE origin_function_signature = '0x'
    ),

    transactions_filtered AS (
    SELECT
    block_number AS block,
    block_timestamp AS timestamp,
    tx_hash AS hash,
    position AS slot,
    tx_fee AS total_fee_paid_slot0
    FROM ethereum.core.fact_transactions
    WHERE position = '0'
    GROUP BY block, timestamp, hash, slot, total_fee_paid_slot0
    )

    , joint_data AS (
    SELECT
    b.block_number AS block,
    t.eth_value AS mev_reward_for_block,
    tf.hash AS slot0_tx_hash,
    tf.total_fee_paid_slot0,
    Run a query to Download Data