MahrooUntitled Query
    Updated 2022-12-12
    with prevtable as (
    select 'FLOW' as chain,
    date_trunc (month,block_timestamp) as date,
    count (distinct tx_id) as "Previous Monthly TX Count",
    "Previous Monthly TX Count"/43200 as "Previous Transactions Per Minute (TPM)",
    "Previous Monthly TX Count"/2592000 as "Previous Transactions Per Second (TPS)"
    from flow.core.fact_transactions
    where date_trunc (month,block_timestamp) between '2022-01-01' and '2022-01-31'
    group by 1,2

    union ALL

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

    union ALL

    select 'Ethereum' as chain,
    date_trunc (month,block_timestamp) as date,
    count (distinct tx_hash) as "Previous Monthly TX Count",
    "Previous Monthly TX Count"/43200 as "Previous Transactions Per Minute (TPM)",
    "Previous Monthly TX Count"/2592000 as "Previous Transactions Per Second (TPS)"
    from ethereum.core.fact_transactions
    where date_trunc (month,block_timestamp) between '2022-01-01' and '2022-01-31'
    group by 1,2

    union ALL

    select 'Binance Smart Chain' as chain,
    date_trunc (month,block_timestamp) as date,
    Run a query to Download Data