{
  "data": {
    "debug": {
      "durationMs": 6,
      "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",
          "Canada"
        ],
        "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": "Canada"
          }
        ]
      }
    },
    "hasNext": true,
    "items": [
      {
        "amount": 15.84,
        "invoice$customerId": 30
      },
      {
        "amount": 10.89,
        "invoice$customerId": 15
      },
      {
        "amount": 9.9,
        "invoice$customerId": 32
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 3,
      "rangeDescription": "显示第 1-3 条，共 4 条",
      "returned": 3,
      "start": 0,
      "totalCount": 4
    },
    "schema": {
      "columns": [
        {
          "dataType": "INTEGER",
          "name": "invoice$customerId",
          "title": "客户 ID"
        },
        {
          "name": "amount"
        }
      ],
      "summary": "按 客户 ID 分组，统计 amount，返回 3 条数据（共 4 条）"
    },
    "total": 4,
    "totalData": {
      "total": 4
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
