Afonso_DiazGrouping txns
    Updated 9 days ago
    with

    main as (
    select
    tx_hash,
    block_timestamp,
    action_data:args:amount / 1e6 as amount,
    amount as amount_usd,
    action_data:args:receiver_id as user
    from
    near.core.ez_actions
    where
    receipt_predecessor_id = 'aurora'
    and receipt_signer_id = 'relay.aurora'
    and receipt_succeeded
    and tx_succeeded
    and receipt_receiver_id = '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1'
    and tx_hash in (select distinct tx_hash from near.core.fact_logs where clean_log::string ilike '%0xe93685f3bba03016f02bd1828badd6195988d950%')
    )

    select
    case
    when amount < 10 then '< $10'
    when amount <= 50 then '$10 - $50'
    when amount <= 100 then '$50 - $100'
    when amount <= 500 then '$100 - $500'
    when amount <= 1000 then '$500 - $1,000'
    when amount <= 5000 then '$1,000 - $5,000'
    when amount <= 10000 then '$5,000 - $10,000'
    when amount <= 100000 then '$10,000 - $100,000'
    else '> $100,000'
    end as type,
    count(distinct tx_hash) as transactions
    from
    main
    group by 1
    Last run: 9 days ago
    TYPE
    TRANSACTIONS
    1
    $1,000 - $5,000163
    2
    $10 - $502374
    3
    $10,000 - $100,00016
    4
    $100 - $500174
    5
    $5,000 - $10,00021
    6
    $50 - $100107
    7
    $500 - $1,00059
    8
    < $101136
    8
    169B
    548s