tkvresearchTotal Transaction Count by Chain in Last 30 Days
    Updated 2024-05-31

    select label,
    to_varchar(total_tx_cnt,'9,999,999,999') as "Total Transaction Count"
    from
    (select label,
    sum(tx_cnt) as total_tx_cnt
    from
    (select date(BLOCK_TIMESTAMP) as datetime,
    'Aptos' as label,
    count(distinct TX_HASH) as tx_cnt
    from aptos.core.fact_transactions
    where date(BLOCK_TIMESTAMP) >= current_date - interval '30 day'
    group by 1,2
    union all
    select date(BLOCK_TIMESTAMP) as datetime,
    'Avalanche' as label,
    count(distinct TX_HASH) as tx_cnt
    from avalanche.core.fact_transactions
    where date(BLOCK_TIMESTAMP) >= current_date - interval '30 day'
    group by 1,2
    union all
    select date(BLOCK_TIMESTAMP) as datetime,
    'BNB' as label,
    count(distinct TX_HASH) as tx_cnt
    from bsc.core.fact_transactions
    where date(BLOCK_TIMESTAMP) >= current_date - interval '30 day'
    group by 1,2
    union all
    select date(BLOCK_TIMESTAMP) as datetime,
    'Cosmos' as label,
    count(distinct TX_ID) as tx_cnt
    from cosmos.core.fact_transactions
    where date(BLOCK_TIMESTAMP) >= current_date - interval '30 day'
    group by 1,2
    union all
    select date(BLOCK_TIMESTAMP) as datetime,
    QueryRunArchived: QueryRun has been archived