{
  "data": {
    "data": {
      "fields": {
        "averageAmount": {
          "aggregatable": false,
          "calculated": true,
          "description": "当前筛选与分组范围的账单总金额除以账单数，不是除以购买客户数。遇到“客单价”等含糊说法，先确认按账单还是按客户计算；无账单时为空，不累计或简单平均各组均额。样例原始单位，币种未指定。",
          "fieldName": "averageAmount",
          "filterType": "number",
          "filterable": false,
          "measure": false,
          "meta": "计算字段 | MONEY",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "当前筛选与分组范围的账单总金额除以账单数，不是除以购买客户数。遇到“客单价”等含糊说法，先确认按账单还是按客户计算；无账单时为空，不累计或简单平均各组均额。样例原始单位，币种未指定。",
              "usage": "Reference directly in columns[]; do not redefine in calculatedFields[]"
            }
          },
          "name": "平均每张账单金额",
          "predefined": true,
          "type": "MONEY",
          "usage": "predefined_formula"
        },
        "billingCountry": {
          "aggregatable": false,
          "fieldName": "billingCountry",
          "filterType": "text",
          "filterable": true,
          "measure": false,
          "meta": "属性 | 文本",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "账单地址中的国家，不是客户地址国家。"
            }
          },
          "name": "账单国家",
          "sourceColumn": "BillingCountry",
          "type": "STRING"
        },
        "customer$country": {
          "aggregatable": false,
          "fieldName": "customer$country",
          "filterType": "text",
          "filterable": true,
          "measure": false,
          "meta": "属性 | 文本",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "客户国家"
            }
          },
          "name": "客户国家",
          "sourceColumn": "Country",
          "type": "STRING"
        },
        "customer$fullName": {
          "aggregatable": false,
          "fieldName": "customer$fullName",
          "filterType": "text",
          "filterable": true,
          "measure": false,
          "meta": "属性 | 文本",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "FirstName 与 LastName 拼接；展示时与客户 ID 一起使用。"
            }
          },
          "name": "客户姓名",
          "sourceColumn": "FirstName",
          "type": "STRING"
        },
        "customerId": {
          "aggregatable": false,
          "fieldName": "customerId",
          "filterType": "number",
          "filterable": true,
          "measure": false,
          "meta": "属性 | 文本",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "客户识别键，排名时与姓名一起分组，避免同名客户合并。"
            }
          },
          "name": "客户 ID",
          "sourceColumn": "CustomerId",
          "type": "INTEGER"
        },
        "invoiceAmount": {
          "aggregatable": true,
          "aggregation": "SUM",
          "fieldName": "invoiceAmount",
          "filterType": "number",
          "filterable": true,
          "measure": true,
          "meta": "度量 | 数值 | 默认聚合:SUM",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "账单金额 (聚合方式: SUM)"
            }
          },
          "name": "账单金额",
          "sourceColumn": "Total",
          "type": "MONEY"
        },
        "invoiceCount": {
          "aggregatable": true,
          "aggregation": "COUNT",
          "fieldName": "invoiceCount",
          "filterType": "number",
          "filterable": true,
          "measure": true,
          "meta": "度量 | 数值 | 默认聚合:COUNT",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "账单数 (聚合方式: COUNT)"
            }
          },
          "name": "账单数",
          "sourceColumn": "InvoiceId",
          "type": "INTEGER"
        },
        "invoiceDate": {
          "aggregatable": false,
          "fieldName": "invoiceDate",
          "filterType": "date",
          "filterable": true,
          "measure": false,
          "meta": "属性 | 日期时间",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "按账单记录日期统计，不自行做时区转换。"
            }
          },
          "name": "账单日期",
          "sourceColumn": "InvoiceDate",
          "timeRole": "business_date",
          "type": "DATETIME"
        },
        "invoiceId": {
          "aggregatable": false,
          "fieldName": "invoiceId",
          "filterType": "number",
          "filterable": true,
          "measure": false,
          "meta": "属性 | 文本",
          "models": {
            "ChinookInvoiceQueryModel": {
              "description": "账单 ID"
            }
          },
          "name": "账单 ID",
          "sourceColumn": "InvoiceId",
          "type": "INTEGER"
        }
      },
      "modelSource": {
        "bundleName": "chinook-teaching",
        "known": true,
        "namespace": "chinook",
        "resourceIdentity": "练习目录\\lab\\models\\query\\ChinookInvoiceQueryModel.qm"
      },
      "models": {
        "ChinookInvoiceQueryModel": {
          "description": "按账单日期、客户和账单国家分析账单金额与张数。金额沿用样例原始单位，不指定币种、不做分元换算，不代表利润、回款或退款。分类分析请用明细分析，不按分类分摊账单总额。",
          "factTable": "Invoice",
          "name": "Chinook 账单分析",
          "purpose": "数据查询和分析",
          "scenarios": [
            "数据查询",
            "统计分析",
            "报表生成"
          ]
        }
      },
      "physicalTables": [
        {
          "role": "fact",
          "table": "Invoice"
        }
      ],
      "prompt": "## 使用说明 (V3版本)\n- 格式约定：字段类型 | 数据类型 | 格式说明\n",
      "version": "v3"
    },
    "format": "json"
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
