Yousefi_1994Average TPM
    Updated 2022-07-20
    with near as (
    select
    block_timestamp::date as days,
    count(distinct txn_hash) / 1440 as tpm
    from mdao_near.transactions
    where block_timestamp::date >='2022-06-01' and block_timestamp::date <= current_date - 1
    group by days
    ),
    flow as (
    select
    block_timestamp::date as days,
    count(distinct tx_id) / 1440 as tpm
    from flow.core.fact_transactions
    where block_timestamp::date >='2022-06-01' and block_timestamp::date <= current_date - 1
    group by days
    ),
    ethereum as (
    select
    block_timestamp::date as days,
    count(distinct tx_hash) / 1440 as tpm
    from ethereum.core.fact_transactions
    where block_timestamp::date >='2022-06-01' and block_timestamp::date <= current_date - 1
    group by days
    ),
    avalanche as (
    select
    block_timestamp::date as days,
    count(distinct tx_hash) / 1440 as tpm
    from avalanche.core.fact_transactions
    where block_timestamp::date >='2022-06-01' and block_timestamp::date <= current_date - 1
    group by days
    )

    select 'Near' as blockchain, avg(tpm)::int as avg_tpm from near
    union
    select 'Flow' as blockchain, avg(tpm)::int as avg_tpm from flow
    Run a query to Download Data