KaskoazulArts District: Total txs and by type
    Updated 2022-07-28
    with TX AS (
    SELECT
    blocK_timestamp,
    txn_hash,
    tx:receipt as receipt,
    tx:public_key as public_key,
    tx:signer_id as signer_id,
    tx:receiver_id as receiver_id
    --,action_data:deposit/pow(10,24) as deposit, action_data:gas/pow(10,24) as gas*/
    FROM flipside_prod_db.mdao_near.transactions
    -- WHERE txn_hash = 'AS5QLqtdQKz4fGZeqtBgXHhLbkA1HpVCM4fRaSoBqK5y' -- sale https://paras.id/token/x.paras.near::426086
    ),
    JSON_PARSING AS (
    SELECT
    block_timestamp,
    txn_hash,
    public_key,
    signer_id,
    receiver_id,
    seq,key,path,index,
    replace(value:outcome:logs[0], '\\') as logs, -- remove // | convert variant | parse json
    check_json(logs) as checks
    FROM tx,
    table(flatten(input => receipt))
    ),
    nft_tx_log AS (
    SELECT
    --PARSE_JSON(LOGS):PARAMS
    block_timestamp,
    txn_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,
    Run a query to Download Data