Updated 2025-02-14
    /*
    WITH successful_receipts AS (
    SELECT DISTINCT
    tx_hash,
    block_timestamp
    FROM near.core.fact_receipts
    WHERE receipt_succeeded = TRUE
    )
    SELECT
    SUM(t.amount) AS total_amount,
    COUNT(DISTINCT t.tx_hash) AS transaction_count
    FROM
    near.core.ez_token_transfers t
    JOIN
    successful_receipts r
    ON
    t.tx_hash = r.tx_hash
    AND t.block_timestamp = r.block_timestamp
    WHERE
    t.to_address = 'marketing.v1.potfactory.potlock.near'
    and t.from_address = 'kingofjank.near'
    */

    /*
    WITH successful_receipts AS (
    SELECT DISTINCT
    tx_hash,
    block_timestamp
    FROM near.core.fact_receipts
    WHERE receipt_succeeded = TRUE
    )
    SELECT
    t.tx_hash,
    t.block_timestamp,
    t.amount
    FROM
    QueryRunArchived: QueryRun has been archived