Updated 2023-11-03
    --- buyers
    --- msg_type -> wasm-execute-exchange
    --- attribute_key -> buyer
    --- attribute_value ->


    --- sellers
    --- msg_type -> wasm-execute-exchange
    --- attribute_key -> seller
    --- attribute_value ->


    --- amount
    --- msg_type -> wasm-execute-exchange
    --- attribute_key -> amount
    --- attribute_value ->

    with

    base AS
    (
    SELECT
    a.value:"DT"::date AS dt
    , a.value:"TX"::string AS tx
    , a.value:"CL"::string AS cl
    , a.value:"AC"::string AS ac
    , a.value:"MK"::string AS mk
    , a.value:"BU"::string AS bu
    , a.value:"SE"::string AS se

    FROM
    (
    SELECT livequery.live.udf_api( 'https://api.flipsidecrypto.com/api/v2/queries/55a0f5e2-9599-4a08-bb8c-9bfdb0e56689/data/latest' ):"data" AS data
    ) live

    JOIN
    Run a query to Download Data