Updated 2024-01-31
    with

    txs as (

    select

    block_timestamp
    , tx_hash
    , case
    when tx_type = 'user_transaction' then 'User Transactions'
    when tx_type = 'state_checkpoint_transaction' then 'State Checkpoint Txs.'
    when tx_type = 'block_metadata_transaction' then 'Block Metadata Txs.'
    end as tx_type

    from aptos.core.fact_transactions
    where block_timestamp ::date > current_date() - interval '{{days}} days'
    )

    select

    tx_type as "Type"
    , count(1) as "Count"

    from txs
    group by 1
    order by 2 desc


    Last run: about 1 month ago
    Type
    Count
    1
    User Transactions350900004
    2
    Block Metadata Txs.38401977
    3
    State Checkpoint Txs.38400896
    4
    1128
    4
    113B
    30s