pietrektthor staking net change
    Updated 22 hours ago
    WITH deposits AS (SELECT to_date(block_timestamp) as day, sum(amount) as amount, sum(amount_usd) as amount_usd from ethereum.core.ez_token_transfers
    where TO_ADDRESS = '0x815c23eca83261b6ec689b60cc4a58b54bc24d8d'
    and (ORIGIN_FUNCTION_SIGNATURE = '0x95cb1b1e' OR ORIGIN_FUNCTION_SIGNATURE = '0x6e553f65' OR ORIGIN_FUNCTION_SIGNATURE = '0x574da717' )
    group by day),

    withdrawals AS (SELECT to_date(block_timestamp) as day, sum(-amount) as amount, sum(-amount_usd) as amount_usd from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = '0xa5f2211b9b8170f694421f2046281775e8468044' and from_ADDRESS = '0x815c23eca83261b6ec689b60cc4a58b54bc24d8d' group by day),

    unioned AS (
    SELECT day, amount, amount_usd FROM deposits
    UNION
    SELECT day, amount, amount_usd FROM withdrawals
    ),

    grouped AS (SELECT day, sum(amount) as amount, sum(amount_usd) as amount_usd FROM unioned GROUP BY day)

    SELECT *, SUM(amount) OVER(ORDER BY day) as amount_cumulative FROM grouped ORDER BY day DESC
    Last run: about 22 hours agoAuto-refreshes every 24 hours
    DAY
    AMOUNT
    AMOUNT_USD
    AMOUNT_CUMULATIVE
    1
    2025-05-21 00:00:00.000
    2
    2025-05-20 00:00:00.000
    3
    2025-05-19 00:00:00.000
    4
    2025-05-18 00:00:00.000
    5
    2025-05-17 00:00:00.000
    6
    2025-05-16 00:00:00.000
    7
    2025-05-15 00:00:00.000
    8
    2025-05-14 00:00:00.000
    9
    2025-05-13 00:00:00.000
    10
    2025-05-12 00:00:00.000
    11
    2025-05-11 00:00:00.000
    12
    2025-05-10 00:00:00.000
    13
    2025-05-09 00:00:00.000
    14
    2025-05-08 00:00:00.000
    15
    2025-05-07 00:00:00.000
    16
    2025-05-06 00:00:00.000
    17
    2025-05-05 00:00:00.000
    18
    2025-05-04 00:00:00.000
    19
    2025-05-03 00:00:00.000
    20
    2025-05-02 00:00:00.000
    ...
    1115
    47KB
    8s