freemartianNear Bridge
    Updated 2024-07-09

    SELECT
    block_timestamp::date AS day,
    count(tx_hash) AS transactions,
    count(source_address) AS bridger,
    -SUM(amount_usd) AS anount_usd,
    'outbound' AS direction
    FROM near.defi.ez_bridge_activity
    WHERE block_timestamp::date >= '2024-01-01'
    AND source_chain = 'near'
    GROUP BY 1,5

    UNION

    SELECT
    block_timestamp::date AS day,
    count(tx_hash) AS transactions,
    count(source_address) AS bridger,
    SUM(amount_usd) AS anount_usd,
    'inbound' AS direction
    FROM near.defi.ez_bridge_activity
    WHERE block_timestamp::date >= '2024-01-01'
    AND destination_chain = 'near'
    GROUP BY 1,5

    QueryRunArchived: QueryRun has been archived