{
  "columns": [
    "billingCountry",
    "sum(invoiceAmount) as totalAmount",
    "amountShare"
  ],
  "groupBy": [
    "billingCountry"
  ],
  "calculatedFields": [
    {
      "name": "amountShare",
      "expression": "ratio_to_total(totalAmount)"
    }
  ],
  "slice": [
    {
      "field": "invoiceDate",
      "op": "[)",
      "value": [
        "2012-01-01",
        "2013-01-01"
      ]
    }
  ],
  "orderBy": [
    "-totalAmount",
    "billingCountry"
  ],
  "limit": 3
}