Updated 2025-04-12
    SELECT
    DATE(block_timestamp) AS date,
    COUNT(DISTINCT tx_hash) AS order_placed,
    COUNT(DISTINCT '0x' || SUBSTR(topics[1], 27)) AS buyer,
    SUM(ethereum.public.udf_hex_to_int(SUBSTRING(data, 3, 64))::NUMERIC / 1e18) AS musd_amount,
    SUM(COUNT(DISTINCT tx_hash)) OVER (ORDER BY date) AS cumulative_order_placed,
    SUM(COUNT(DISTINCT '0x' || SUBSTR(topics[1], 27))) OVER (ORDER BY date) AS cumulative_buyer,
    SUM(SUM(ethereum.public.udf_hex_to_int(SUBSTRING(data, 3, 64))::NUMERIC / 1e18)) OVER (ORDER BY date)AS cumulative_musd_amount
    FROM
    mezo.testnet.fact_event_logs
    WHERE
    CONTRACT_ADDRESS = LOWER('0x637e22A1EBbca50EA2d34027c238317fD10003eB')
    AND topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    AND '0x' || SUBSTR(topics[2], 27) = '0xd6626dcca8aa760b227e02b2391aaaecf9371c5d'
    GROUP BY
    DATE(block_timestamp)
    ORDER BY
    date DESC;

    Last run: 13 days ago
    DATE
    ORDER_PLACED
    BUYER
    MUSD_AMOUNT
    CUMULATIVE_ORDER_PLACED
    CUMULATIVE_BUYER
    CUMULATIVE_MUSD_AMOUNT
    1
    2025-04-12 00:00:00.000433236700593134124304900
    2
    2025-04-11 00:00:00.000492300339000588833804268200
    3
    2025-04-10 00:00:00.000595332410300539630803929200
    4
    2025-04-09 00:00:00.000709376540500480127483518900
    5
    2025-04-08 00:00:00.000736404522200409223722978400
    6
    2025-04-07 00:00:00.000567378387900335619682456200
    7
    2025-04-06 00:00:00.000632441462800278915902068300
    8
    2025-04-05 00:00:00.000639372437900215711491605500
    9
    2025-04-04 00:00:00.00049327436230015187771167600
    10
    2025-04-03 00:00:00.0003272032591001025503805300
    11
    2025-04-02 00:00:00.00016684138800698300546200
    12
    2025-04-01 00:00:00.000623041800532216407400
    13
    2025-03-31 00:00:00.000513442300470186365600
    14
    2025-03-30 00:00:00.00026896207600419152323300
    15
    2025-03-29 00:00:00.0001515611570015156115700
    15
    885B
    3s