Updated 2022-10-18
    with TX AS (
    SELECT
    blocK_timestamp,
    TX_HASH,
    tx:receipt as receipt,
    tx:public_key as public_key,
    tx:signer_id as signer_id,
    tx:receiver_id as receiver_id
    FROM near.core.fact_transactions),
    JSON_PARSING AS (
    SELECT
    block_timestamp,
    TX_HASH,
    public_key,
    signer_id,
    receiver_id,
    seq,key,path,index,
    replace(value:outcome:logs[0], '\\') as logs,
    check_json(logs) as checks
    FROM tx,
    table(flatten(input => receipt))),
    nft_tx_log AS (
    SELECT
    block_timestamp,
    TX_HASH,
    public_key,
    signer_id,
    receiver_id,
    try_parse_json(logs) as parse_logs,
    parse_logs:type as type,
    parse_logs:params:buyer_id as buyer_id,
    parse_logs:params:owner_id as owner_id,
    parse_logs:params:is_offer as is_offer,
    parse_logs:params:is_auction as is_auction,
    parse_logs:params:nft_contract_id as nft_contract_id,
    parse_logs:params:token_id as token_id,
    Run a query to Download Data