freemartianTransactions Profile
    Updated 2022-12-06
    with source as (
    select
    tx_sender,
    count(tx_id) as transactions_count
    from terra.core.fact_transactions
    where TX_SUCCEEDED = 'TRUE'
    and block_timestamp >= CURRENT_DATE - {{Past_X_Days}}
    group by tx_sender)

    select
    case
    when transactions_count < 10 then 'Low Profile'
    when transactions_count >= 10 and transactions_count < 100 then 'Medium Profile'
    when transactions_count >= 100 and transactions_count < 1000 then 'High Profile'
    when transactions_count >= 1000 then 'Expert Profile'
    end as profile,
    count(distinct tx_sender) as users
    from source
    group by profile

    Run a query to Download Data