princefarzam2023-07-20 12:25 AM
    SELECT
    date_trunc('day', block_timestamp)::date AS Day,
    Count(DISTINCT TX_HASH) AS Number_of_withdraws,
    Count(DISTINCT ORIGIN_FROM_ADDRESS) AS withdrawers,
    Sum(DECODED_LOG:amount::int / POW(10, 18)) AS Amount_withdrawn,
    Sum(Amount_withdrawn) over (
    Order by
    day
    ) AS Cum_Amount_withdrawn
    FROM
    avalanche.core.ez_decoded_event_logs
    WHERE
    ORIGIN_TO_ADDRESS = '0xb8f531c0d3c53b1760bcb7f57d87762fd25c4977' -- Yield Yak: Platypus sAVAX (YRT)
    AND CONTRACT_ADDRESS = '0xb8f531c0d3c53b1760bcb7f57d87762fd25c4977' -- Yield Yak: Platypus sAVAX (YRT)
    AND EVENT_NAME = 'Withdraw'
    AND TX_STATUS = 'SUCCESS'
    GROUP BY
    day
    ORDER BY
    day ASC
    Run a query to Download Data