{
  "data": {
    "debug": {
      "durationMs": 2,
      "extra": {
        "aggSql": "select null \"customerId\",\n       null \"customer$fullName\",\n       null \"totalAmount\",\n       count(*) \"total\"\nfrom (select\tt1.CustomerId \"customerId\",\td1.FirstName || ' ' || d1.LastName \"customer$fullName\",\tSUM(t1.Total) \"totalAmount\"\tfrom Invoice t1\t left join Customer d1  on t1.CustomerId=d1.CustomerId where  1=1  and \tt1.InvoiceDate >=?  and \tt1.InvoiceDate <? \tgroup by t1.CustomerId,\td1.FirstName || ' ' || d1.LastName having  1=1  and \tSUM(t1.Total) >? ) tx",
        "params": [
          "2012-01-01 00:00:00",
          "2013-01-01 00:00:00",
          20
        ],
        "sql": "select\tt1.CustomerId \"customerId\",\td1.FirstName || ' ' || d1.LastName \"customer$fullName\",\tSUM(t1.Total) \"totalAmount\"\tfrom Invoice t1\t left join Customer d1  on t1.CustomerId=d1.CustomerId where  1=1  and \tt1.InvoiceDate >=?  and \tt1.InvoiceDate <? \tgroup by t1.CustomerId,\td1.FirstName || ' ' || d1.LastName having  1=1  and \tSUM(t1.Total) >?  order by SUM(t1.Total) desc,\tt1.CustomerId asc"
      },
      "normalized": {
        "groupBy": [
          {
            "field": "customerId"
          },
          {
            "field": "customer$fullName"
          },
          {
            "agg": "SUM",
            "field": "totalAmount"
          }
        ],
        "having": [
          {
            "field": "totalAmount",
            "op": ">",
            "value": 20
          }
        ],
        "orderBy": [
          {
            "dir": "desc",
            "field": "totalAmount",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "customerId",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "slice": [
          {
            "field": "invoiceDate",
            "op": "[)",
            "value": [
              "2012-01-01",
              "2013-01-01"
            ]
          }
        ]
      }
    },
    "hasNext": false,
    "items": [
      {
        "customer$fullName": "Richard Cunningham",
        "customerId": 26,
        "totalAmount": 25.84
      },
      {
        "customer$fullName": "João Fernandes",
        "customerId": 34,
        "totalAmount": 24.77
      },
      {
        "customer$fullName": "Fernanda Ramos",
        "customerId": 13,
        "totalAmount": 24.75
      },
      {
        "customer$fullName": "Joakim Johansson",
        "customerId": 51,
        "totalAmount": 24.75
      },
      {
        "customer$fullName": "Mark Taylor",
        "customerId": 55,
        "totalAmount": 22.77
      }
    ],
    "pagination": {
      "hasMore": false,
      "limit": 100,
      "rangeDescription": "显示第 1-5 条",
      "returned": 5,
      "start": 0
    },
    "schema": {
      "columns": [
        {
          "dataType": "INTEGER",
          "name": "customerId",
          "title": "客户 ID"
        },
        {
          "dataType": "STRING",
          "name": "customer$fullName",
          "title": "客户姓名"
        },
        {
          "name": "totalAmount"
        }
      ],
      "summary": "按 客户 ID、客户姓名 分组，统计 totalAmount，返回 5 条数据"
    },
    "total": 0
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
