Updated 2025-01-17
    select
    count(distinct user) as users,
    sum(am) as amount,
    count(distinct hash) as txs,
    min(date) as min_date,
    max(date) as max_date
    from(
    select
    TX_TO as user,
    -1*AMOUNT/pow(10,6) as am,
    TX_ID as hash,
    BLOCK_TIMESTAMP as date
    from eclipse.core.fact_transfers
    where TX_FROM = 'JBUYTVaQAvp61GKnbgooEEzyTsevG1x5fYDnGoDD2soT'
    and SUCCEEDED = 'TRUE'

    UNION

    select
    TX_FROM as user,
    AMOUNT/pow(10,6) as am,
    TX_ID as hash,
    BLOCK_TIMESTAMP as date
    from eclipse.core.fact_transfers
    where TX_TO = 'JBUYTVaQAvp61GKnbgooEEzyTsevG1x5fYDnGoDD2soT'
    and SUCCEEDED = 'TRUE'
    --or TX_FROM = 'GkqE1ys4HAciAZK2y66eDkBGpqCZqbm8niy5v3m3GrKE'
    )
    group by 1
    Last run: about 2 months ago
    USERS
    AMOUNT
    TXS
    MIN_DATE
    MAX_DATE
    1
    167481005609.949053325352024-12-08 08:04:34.0002025-01-17 08:02:54.000
    1
    82B
    4s