hess13. AXIE Vs. Non-AXIE
    Updated 2025-04-09
    with platforms as ( select * from $query('798c2d2f-083d-45a4-90e3-262eb17af08f')
    where label_type = 'games'
    and label ilike '%AXIE%'
    )
    ,
    base as ( select distinct from_address
    from ronin.core.fact_transactions a join platforms b on a.to_address = b.address
    and tx_hash not in (select tx_hash from ronin.core.ez_decoded_event_logs
    where contract_address = lower('0x05b0bb3c1c320b280501b86706c3551995bc8571')))
    ,
    staking as ( select block_timestamp::Date as date,
    tx_hash,
    DECODED_LOG:_user::string as staker,
    DECODED_LOG:_amount/pow(10,18) as stake_amount
    from ronin.core.ez_decoded_event_logs
    where contract_address = lower('0x05b0bb3c1c320b280501b86706c3551995bc8571')
    and event_name = 'Staked'
    and block_timestamp >= '2025-01-01'
    )

    select
    case when staker in (select from_address from base) then 'AXIE User' else 'Non-AXIE User' end as type,
    sum(stake_amount) as "Amount"
    from staking
    where date >= '2025-01-01'
    group by 1
    Last run: 18 days ago
    TYPE
    Amount
    1
    Non-AXIE User1814950.71820495
    2
    AXIE User22969971.4382011
    2
    67B
    27s