Mrftisimilar-red copy
    Updated 8 hours ago
    -- forked from similar-red @ https://flipsidecrypto.xyz/studio/queries/db98084c-e534-452d-aefe-0d6c6341b4f1

    with usertbl as
    (WITH database AS (
    SELECT
    a.BLOCK_TIMESTAMP,
    a.TX_HASH,
    a.ORIGIN_FROM_ADDRESS as "Unstaker",
    CAST(ethereum.public.udf_hex_to_int(data) AS decimal) / 1e18 AS "$sMON Burned",
    b.tx_fee as "Fee ($MON)"
    FROM
    monad.testnet.fact_event_logs a
    join
    monad.testnet.fact_transactions b on a.tx_hash = b.tx_hash

    where a.CONTRACT_ADDRESS = '0x07aabd925866e8353407e67c1d157836f7ad923e'
    and a.ORIGIN_TO_ADDRESS = '0x07aabd925866e8353407e67c1d157836f7ad923e'
    and a.ORIGIN_FUNCTION_SIGNATURE = '0x30af6b2e'
    and a.TX_SUCCEEDED = 'TRUE'
    AND a.BLOCK_TIMESTAMP > '2025-02-18 00:00:00.000'
    )

    select
    "Unstaker",
    sum ("$sMON Burned") as "Total $sMON Burned",
    count (distinct TX_HASH) as "Unstake tx"
    from database
    group by 1
    )

    SELECT
    case
    when "Total $sMON Burned" < 0.1 then 'Tier1: Less Than 0.1 $sMON Burned'
    when "Total $sMON Burned" >= 0.1 and "Total $sMON Burned" < 0.5 then 'Tier2: 0.1-0.5 $sMON Burned'
    when "Total $sMON Burned" >= 0.5 and "Total $sMON Burned" < 1 then 'Tier3: 0.5-1 $sMON Burned'
    when "Total $sMON Burned" >= 1 and "Total $sMON Burned" < 10 then 'Tier4: 1-10 $sMON Burned'
    Last run: about 8 hours agoAuto-refreshes every 12 hours