Updated 2023-09-23
    WITH SquidData AS (
    SELECT
    sender AS user,
    DATE_TRUNC('day', block_timestamp) AS date,
    'Squid' AS bridge,
    tx_hash
    FROM
    axelar.defi.ez_bridge_squid
    WHERE
    source_chain = 'base' OR destination_chain = 'base'
    GROUP BY
    sender, 'Squid', DATE_TRUNC('day', block_timestamp), tx_hash
    ),
    DailyUsers AS (
    SELECT
    date,
    bridge,
    COUNT(DISTINCT user) AS users,
    COUNT(DISTINCT tx_hash) AS transaction_count
    FROM
    SquidData
    GROUP BY
    date, bridge
    )
    SELECT
    date,
    users AS " users",
    transaction_count AS "Transactions",
    SUM(users) OVER (ORDER BY date ASC) AS "Cumulative users",
    SUM(transaction_count) OVER (ORDER BY date ASC) AS "Cumulative Transactions"
    FROM
    DailyUsers
    WHERE
    date >= '2023-08-01'
    ORDER BY
    date ASC;