omer93Avalanche principals 4
    Updated 2024-01-10
    WITH
    tps as (
    select
    trunc(block_timestamp,'hour') as hour,
    count(distinct tx_hash) as txs,
    txs/3600 as tps
    from avalanche.core.fact_transactions
    where block_timestamp>=current_date-interval '3 months' and status='SUCCESS'
    group by 1
    order by 1 asc
    )
    SELECT
    trunc(hour,'day') as date,
    avg(tps) as avg_tps
    from tps where date<current_date
    group by 1
    order by 1 asc


    QueryRunArchived: QueryRun has been archived