{
  "data": {
    "debug": {
      "durationMs": 5,
      "extra": {
        "aggSql": "select null \"invoice$customerId\",\n       null \"amount\",\n       count(*) \"total\"\nfrom (select\td1.CustomerId \"invoice$customerId\",\tSUM(t1.UnitPrice * t1.Quantity) \"amount\"\tfrom InvoiceLine t1\t left join Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <?  and \td1.BillingCountry =? \tgroup by d1.CustomerId) tx",
        "params": [
          "2012-01-01 00:00:00",
          "2013-01-01 00:00:00",
          "USA"
        ],
        "sql": "select\td1.CustomerId \"invoice$customerId\",\tSUM(t1.UnitPrice * t1.Quantity) \"amount\"\tfrom InvoiceLine t1\t left join Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <?  and \td1.BillingCountry =? \tgroup by d1.CustomerId order by SUM(t1.UnitPrice * t1.Quantity) desc,\td1.CustomerId asc"
      },
      "normalized": {
        "groupBy": [
          {
            "field": "invoice$customerId"
          },
          {
            "agg": "SUM",
            "field": "amount"
          }
        ],
        "orderBy": [
          {
            "dir": "desc",
            "field": "amount",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "invoice$customerId",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "slice": [
          {
            "field": "invoice$invoiceDate",
            "op": "[)",
            "value": [
              "2012-01-01",
              "2013-01-01"
            ]
          },
          {
            "field": "invoice$billingCountry",
            "op": "=",
            "value": "USA"
          }
        ]
      }
    },
    "hasNext": false,
    "items": [
      {
        "amount": 25.84,
        "invoice$customerId": 26
      },
      {
        "amount": 17.88,
        "invoice$customerId": 28
      },
      {
        "amount": 17.84,
        "invoice$customerId": 22
      },
      {
        "amount": 15.879999999999999,
        "invoice$customerId": 24
      },
      {
        "amount": 10.91,
        "invoice$customerId": 17
      },
      {
        "amount": 8.91,
        "invoice$customerId": 21
      },
      {
        "amount": 8.91,
        "invoice$customerId": 25
      },
      {
        "amount": 7.9399999999999995,
        "invoice$customerId": 20
      },
      {
        "amount": 7.93,
        "invoice$customerId": 19
      },
      {
        "amount": 1.98,
        "invoice$customerId": 16
      },
      {
        "amount": 1.98,
        "invoice$customerId": 18
      },
      {
        "amount": 0.99,
        "invoice$customerId": 23
      },
      {
        "amount": 0.99,
        "invoice$customerId": 27
      }
    ],
    "pagination": {
      "hasMore": false,
      "limit": 500,
      "rangeDescription": "显示第 1-13 条，共 13 条",
      "returned": 13,
      "start": 0,
      "totalCount": 13
    },
    "schema": {
      "columns": [
        {
          "dataType": "INTEGER",
          "name": "invoice$customerId",
          "title": "客户 ID"
        },
        {
          "name": "amount"
        }
      ],
      "summary": "按 客户 ID 分组，统计 amount，返回 13 条数据"
    },
    "total": 13,
    "totalData": {
      "total": 13
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
