Afonso_DiazTop 10 Users by Total Volume (Stake)
    Updated 2025-04-16
    with

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as user,
    utils.udf_hex_to_int(data)::bigint / 1e18 as amount,
    iff(topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000', 'Stake', 'Unstake') as event_name
    from
    monad.testnet.fact_event_logs
    where
    tx_succeeded
    and origin_to_address = '0xb2f82d0f38dc453d596ad40a37799446cc89274a'
    and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    and contract_address = lower('0xb2f82D0f38dc453D596Ad40A37799446Cc89274A')
    and block_timestamp >= '2025-02-19'
    )

    select
    user,
    sum(amount) as total_mon,
    count(tx_hash) as tx_count
    from main
    where
    amount > 0
    and event_name = 'Stake'
    group by user
    order by total_mon desc
    limit 10


    QueryRunArchived: QueryRun has been archived