Updated 2024-12-04

    -- with tps as (
    -- select avg(tps) as avg_tps
    -- from (
    select
    date_trunc('day', block_timestamp ) as day
    , count(tx_id)/(24*60*60) as tps
    from eclipse.core.fact_transactions
    where block_timestamp >= DATEADD(DAY, -29, CURRENT_DATE())
    group by 1
    order by 1
    -- )
    -- )

    -- , avg_daily_txs as (
    -- select
    -- count(tx_id)/count(distinct date_trunc('day', block_timestamp)) as avg_daily_txs
    -- from eclipse.core.fact_transactions
    -- where block_timestamp >= DATEADD(DAY, -29, CURRENT_DATE())
    -- )

    -- , avg_fees as (
    -- select
    -- avg(fee /1e9) as avg_fee_eth
    -- , avg(fee /1e9 * p.price) as avg_fee_usd
    -- from eclipse.core.fact_transactions t
    -- left join ethereum.price.ez_prices_hourly p
    -- on p.hour = date_trunc ('hour', block_timestamp)
    -- and p.blockchain = 'ethereum' and p.symbol = 'ETH'
    -- where block_timestamp >= DATEADD(DAY, -30, CURRENT_DATE())
    -- -- group by 1
    -- -- order by 1
    -- )

    -- select
    QueryRunArchived: QueryRun has been archived