saeedmzn[Superwalk ] - GRND staking activity Total
    Updated 2025-02-24
    with stake as (
    WITH base_data AS (
    select
    tx_hash,
    block_timestamp::date as date,
    origin_from_address as user,
    symbol,
    amount as token_amount,
    amount_usd,
    'stake' as action_type
    from kaia.core.ez_token_transfers
    where ORIGIN_TO_ADDRESS = '0x9bcb2efc545f89986cf70d3adc39079a1b730d63'
    and ORIGIN_FUNCTION_SIGNATURE in('0x6e553f65')
    )
    SELECT
    tx_hash,
    date,
    user,
    action_type,
    MAX(CASE WHEN symbol = 'GRND' THEN token_amount END) as GRND_amount,
    MAX(CASE WHEN symbol = 'GRND' THEN amount_usd END) as GRND_amount_usd,
    MAX(CASE WHEN symbol = 'xGRND' THEN token_amount END) as xGRND_amount,
    MAX(CASE WHEN symbol = 'xGRND' THEN amount_usd END) as xGRND_amount_usd
    FROM base_data
    GROUP BY tx_hash, date, user, action_type
    ),
    unstake as (
    with burned_xgrnd as (
    select
    tx_hash,
    block_timestamp::date as date,
    origin_from_address as user,
    amount
    from kaia.core.ez_token_transfers
    where ORIGIN_TO_ADDRESS = '0x9bcb2efc545f89986cf70d3adc39079a1b730d63'
    and ORIGIN_FUNCTION_SIGNATURE = '0xba087652'
    QueryRunArchived: QueryRun has been archived