Pine AnalyticsBase-EUR copy
    Updated 2024-08-19
    WITH tab1 AS (
    SELECT
    date_trunc('day', block_timestamp) as day,
    CASE
    WHEN from_address LIKE '0x0000000000000000000000000000000000000000' THEN amount
    WHEN to_address LIKE '0x0000000000000000000000000000000000000000' THEN -amount
    ELSE 0
    END as net_mint_amt
    FROM base.core.ez_token_transfers
    WHERE contract_address LIKE lower('0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42')
    AND (
    from_address LIKE '0x0000000000000000000000000000000000000000'
    OR to_address LIKE '0x0000000000000000000000000000000000000000'
    )
    )

    SELECT
    day,
    sum(net_mint_amt) as net_mint,
    sum(net_mint) over (order BY day) as supply

    FROM tab1
    WHERE day > '2024-07-15'
    GROUP BY 1
    order BY 1 desc



    QueryRunArchived: QueryRun has been archived