{
  "data": {
    "debug": {
      "durationMs": 3,
      "extra": {
        "aggSql": "select null \"albumArtistId\",\n       null \"albumArtistName\",\n       null \"totalAmount\",\n       null \"quantity\",\n       count(*) \"total\"\nfrom (select\td5.ArtistId \"albumArtistId\",\td6.Name \"albumArtistName\",\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 \"albumArtistId\",\td6.Name \"albumArtistName\",\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": "albumArtistId"
          },
          {
            "field": "albumArtistName"
          },
          {
            "agg": "SUM",
            "field": "totalAmount"
          },
          {
            "agg": "SUM",
            "field": "quantity"
          }
        ],
        "orderBy": [
          {
            "dir": "desc",
            "field": "totalAmount",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "albumArtistId",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "slice": [
          {
            "field": "invoice$invoiceDate",
            "op": "[)",
            "value": [
              "2012-01-01",
              "2013-01-01"
            ]
          }
        ]
      }
    },
    "hasNext": false,
    "items": [
      {
        "albumArtistId": 257,
        "albumArtistName": "Academy of St. Martin in the Fields, Sir Neville Marriner & Thurston Dart",
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "albumArtistId": 263,
        "albumArtistName": "Equale Brass Ensemble, John Eliot Gardiner & Munich Monteverdi Orchestra and Choir",
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "albumArtistId": 267,
        "albumArtistName": "Göteborgs Symfoniker & Neeme Järvi",
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "albumArtistId": 272,
        "albumArtistName": "Emerson String Quartet",
        "quantity": 1,
        "totalAmount": 0.99
      }
    ],
    "pagination": {
      "hasMore": false,
      "limit": 5,
      "rangeDescription": "显示第 116-119 条，共 119 条",
      "returned": 4,
      "start": 115,
      "totalCount": 119
    },
    "schema": {
      "columns": [
        {
          "dataType": "INTEGER",
          "name": "albumArtistId",
          "title": "艺术家"
        },
        {
          "dataType": "TEXT",
          "name": "albumArtistName",
          "title": "艺术家"
        },
        {
          "name": "totalAmount"
        },
        {
          "name": "quantity"
        }
      ],
      "summary": "按 艺术家、艺术家 分组，统计 totalAmount、quantity，返回 4 条数据（共 119 条）"
    },
    "total": 119,
    "totalData": {
      "total": 119
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
