{
  "data": {
    "debug": {
      "durationMs": 3,
      "extra": {
        "aggSql": "select null \"album$id\",\n       null \"album$caption\",\n       null \"totalAmount\",\n       null \"quantity\",\n       count(*) \"total\"\nfrom (select\td3.AlbumId \"album$id\",\td5.Title \"album$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 Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <?  and \td5.ArtistId =? \tgroup by d3.AlbumId,\td5.Title) tx",
        "params": [
          "2012-01-01 00:00:00",
          "2013-01-01 00:00:00",
          90
        ],
        "sql": "select\td3.AlbumId \"album$id\",\td5.Title \"album$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 Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <?  and \td5.ArtistId =? \tgroup by d3.AlbumId,\td5.Title order by SUM(t1.UnitPrice * t1.Quantity) desc,\td3.AlbumId asc"
      },
      "normalized": {
        "groupBy": [
          {
            "field": "album$id"
          },
          {
            "field": "album$caption"
          },
          {
            "agg": "SUM",
            "field": "totalAmount"
          },
          {
            "agg": "SUM",
            "field": "quantity"
          }
        ],
        "orderBy": [
          {
            "dir": "desc",
            "field": "totalAmount",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "album$id",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "slice": [
          {
            "field": "invoice$invoiceDate",
            "op": "[)",
            "value": [
              "2012-01-01",
              "2013-01-01"
            ]
          },
          {
            "field": "artist$id",
            "op": "=",
            "value": 90
          }
        ]
      }
    },
    "hasNext": false,
    "items": [
      {
        "album$caption": "Powerslave",
        "album$id": 107,
        "quantity": 5,
        "totalAmount": 4.95
      },
      {
        "album$caption": "Rock In Rio [CD1]",
        "album$id": 108,
        "quantity": 4,
        "totalAmount": 3.96
      },
      {
        "album$caption": "Rock In Rio [CD2]",
        "album$id": 109,
        "quantity": 3,
        "totalAmount": 2.9699999999999998
      },
      {
        "album$caption": "A Real Dead One",
        "album$id": 95,
        "quantity": 2,
        "totalAmount": 1.98
      },
      {
        "album$caption": "Fear Of The Dark",
        "album$id": 99,
        "quantity": 2,
        "totalAmount": 1.98
      },
      {
        "album$caption": "Live After Death",
        "album$id": 102,
        "quantity": 2,
        "totalAmount": 1.98
      },
      {
        "album$caption": "Seventh Son of a Seventh Son",
        "album$id": 110,
        "quantity": 2,
        "totalAmount": 1.98
      },
      {
        "album$caption": "The Number of The Beast",
        "album$id": 112,
        "quantity": 2,
        "totalAmount": 1.98
      },
      {
        "album$caption": "Virtual XI",
        "album$id": 114,
        "quantity": 2,
        "totalAmount": 1.98
      },
      {
        "album$caption": "A Real Live One",
        "album$id": 96,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Brave New World",
        "album$id": 97,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Dance Of Death",
        "album$id": 98,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Iron Maiden",
        "album$id": 100,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Killers",
        "album$id": 101,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Live At Donington 1992 (Disc 1)",
        "album$id": 103,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Live At Donington 1992 (Disc 2)",
        "album$id": 104,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "No Prayer For The Dying",
        "album$id": 105,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "Somewhere in Time",
        "album$id": 111,
        "quantity": 1,
        "totalAmount": 0.99
      },
      {
        "album$caption": "The X Factor",
        "album$id": 113,
        "quantity": 1,
        "totalAmount": 0.99
      }
    ],
    "pagination": {
      "hasMore": false,
      "limit": 500,
      "rangeDescription": "显示第 1-19 条，共 19 条",
      "returned": 19,
      "start": 0,
      "totalCount": 19
    },
    "schema": {
      "columns": [
        {
          "dataType": "INTEGER",
          "name": "album$id",
          "title": "专辑"
        },
        {
          "dataType": "TEXT",
          "name": "album$caption",
          "title": "专辑"
        },
        {
          "name": "totalAmount"
        },
        {
          "name": "quantity"
        }
      ],
      "summary": "按 专辑、专辑 分组，统计 totalAmount、quantity，返回 19 条数据"
    },
    "total": 19,
    "totalData": {
      "total": 19
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
