MahrooUntitled Query
    Updated 2022-12-12
    with maintable as (
    select 'FLOW' as chain,
    date_trunc (month,block_timestamp) as date,
    count (distinct tx_id) as "Monthly TX Count",
    "Monthly TX Count"/43200 as "Transactions Per Minute (TPM)",
    "Monthly TX Count"/2592000 as "Transactions Per Second (TPS)"
    from flow.core.fact_transactions
    where block_timestamp >= '2022-01-01'
    and block_timestamp::date != CURRENT_DATE
    and tx_succeeded = 'TRUE'
    group by 1,2

    union ALL

    select 'Avalanche' as chain,
    date_trunc (month,block_timestamp) as date,
    count (distinct tx_hash) as "Monthly TX Count",
    "Monthly TX Count"/43200 as "Transactions Per Minute (TPM)",
    "Monthly TX Count"/2592000 as "Transactions Per Second (TPS)"
    from avalanche.core.fact_transactions
    where block_timestamp >= '2022-01-01'
    and block_timestamp::date != CURRENT_DATE
    and status = 'SUCCESS'
    group by 1,2

    union ALL

    select 'Ethereum' as chain,
    date_trunc (month,block_timestamp) as date,
    count (distinct tx_hash) as "Monthly TX Count",
    "Monthly TX Count"/43200 as "Transactions Per Minute (TPM)",
    "Monthly TX Count"/2592000 as "Transactions Per Second (TPS)"
    from ethereum.core.fact_transactions
    where block_timestamp >= '2022-01-01'
    and block_timestamp::date != CURRENT_DATE
    and status = 'SUCCESS'
    Run a query to Download Data