shadabEthereum - MEV stats copy copy
    Updated 2024-07-19
    -- forked from pyor-subscriptions / Ethereum - MEV stats copy @ https://flipsidecrypto.xyz/pyor-subscriptions/q/YiRmL-DGA_uL/ethereum---mev-stats-copy

    -- forked from Moe / Ethereum - MEV stats @ https://flipsidecrypto.xyz/Moe/q/7BzxyfPTv9Lw/ethereum---mev-stats

    with eth_price as (
    select
    hour :: date as date,
    avg(price) as eth_price
    from
    ethereum.price.ez_prices_hourly
    where
    SYMBOL ilike 'weth'
    group by
    1
    ),
    txs_list as(
    select
    *
    from
    ethereum.core.fact_transactions
    where
    block_timestamp >= cast('{{start_time}}' as timestamp)
    and block_timestamp < cast('{{end_time}}' as timestamp)
    ),
    blocks_list as(
    select
    *
    from
    ethereum.core.fact_blocks
    where
    block_timestamp >= cast('{{start_time}}' as timestamp)
    and block_timestamp < cast('{{end_time}}' as timestamp)
    ),
    traces_list as(
    select
    *
    QueryRunArchived: QueryRun has been archived