{
  "data": {
    "debug": {
      "durationMs": 2,
      "extra": {
        "aggSql": "select null \"artist$id\",\n       null \"artist$caption\",\n       null \"totalAmount\",\n       null \"quantity\",\n       count(*) \"total\"\nfrom (select\td5.ArtistId \"artist$id\",\td6.Name \"artist$caption\",\tSUM(t1.UnitPrice * t1.Quantity) \"totalAmount\",\tSUM(t1.Quantity) \"quantity\"\tfrom InvoiceLine t1\t left join Track d3  on t1.TrackId=d3.TrackId left join Album d5  on d3.AlbumId=d5.AlbumId left join Artist d6  on d5.ArtistId=d6.ArtistId left join Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <? \tgroup by d5.ArtistId,\td6.Name) tx",
        "params": [
          "2012-01-01 00:00:00",
          "2013-01-01 00:00:00"
        ],
        "sql": "select\td5.ArtistId \"artist$id\",\td6.Name \"artist$caption\",\tSUM(t1.UnitPrice * t1.Quantity) \"totalAmount\",\tSUM(t1.Quantity) \"quantity\"\tfrom InvoiceLine t1\t left join Track d3  on t1.TrackId=d3.TrackId left join Album d5  on d3.AlbumId=d5.AlbumId left join Artist d6  on d5.ArtistId=d6.ArtistId left join Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <? \tgroup by d5.ArtistId,\td6.Name order by SUM(t1.UnitPrice * t1.Quantity) desc,\td5.ArtistId asc"
      },
      "normalized": {
        "groupBy": [
          {
            "field": "artist$id"
          },
          {
            "field": "artist$caption"
          },
          {
            "agg": "SUM",
            "field": "totalAmount"
          },
          {
            "agg": "SUM",
            "field": "quantity"
          }
        ],
        "orderBy": [
          {
            "dir": "desc",
            "field": "totalAmount",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "artist$id",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "slice": [
          {
            "field": "invoice$invoiceDate",
            "op": "[)",
            "value": [
              "2012-01-01",
              "2013-01-01"
            ]
          }
        ]
      }
    },
    "hasNext": true,
    "items": [
      {
        "artist$caption": "Iron Maiden",
        "artist$id": 90,
        "quantity": 34,
        "totalAmount": 33.66
      },
      {
        "artist$caption": "U2",
        "artist$id": 150,
        "quantity": 28,
        "totalAmount": 27.72
      },
      {
        "artist$caption": "The Office",
        "artist$id": 156,
        "quantity": 13,
        "totalAmount": 25.87
      },
      {
        "artist$caption": "Metallica",
        "artist$id": 50,
        "quantity": 26,
        "totalAmount": 25.74
      },
      {
        "artist$caption": "Led Zeppelin",
        "artist$id": 22,
        "quantity": 24,
        "totalAmount": 23.759999999999998
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 5,
      "rangeDescription": "显示第 1-5 条，共 119 条",
      "returned": 5,
      "start": 0,
      "totalCount": 119
    },
    "schema": {
      "columns": [
        {
          "dataType": "INTEGER",
          "name": "artist$id",
          "title": "艺术家"
        },
        {
          "dataType": "TEXT",
          "name": "artist$caption",
          "title": "艺术家"
        },
        {
          "name": "totalAmount"
        },
        {
          "name": "quantity"
        }
      ],
      "summary": "按 艺术家、艺术家 分组，统计 totalAmount、quantity，返回 5 条数据（共 119 条）"
    },
    "total": 119,
    "totalData": {
      "total": 119
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
