Table decimal group average

table-decimal-group-average · version 1.0.0 · CSV & tables · free, no key needed

Group table rows by string keys and compute exact decimal average results with deterministic ordering.

Use when you need to: group table decimal average · exact decimal average by category · aggregate decimal average by composite key.

Decide before calling

Read the versioned contract and the supported scope below. Reuse table-decimal-group-average@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use table-decimal-group-average@1.0.0 for group table decimal average. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "rows": [
    {
      "g": "A",
      "v": "1"
    },
    {
      "g": "A",
      "v": "2"
    }
  ],
  "group_by": [
    "g"
  ],
  "value_column": "v",
  "null_policy": "ignore",
  "scale": 2,
  "rounding": "half_even"
}

Response:

{
  "result": {
    "groups": [
      {
        "key_values": [
          "A"
        ],
        "row_count": 2,
        "value_count": 2,
        "average": "1.5",
        "scale": 2,
        "rounding": "half_even"
      }
    ],
    "standard_version": "IBM General Decimal Arithmetic Specification 1.70; SQL:2016"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "table-decimal-group-average",
  "version": "1.0.0",
  "input": {
    "rows": [
      {
        "g": "A",
        "v": "1"
      },
      {
        "g": "A",
        "v": "2"
      }
    ],
    "group_by": [
      "g"
    ],
    "value_column": "v",
    "null_policy": "ignore",
    "scale": 2,
    "rounding": "half_even"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/table-decimal-group-average/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"rows":[{"g":"A","v":"1"},{"g":"A","v":"2"}],"group_by":["g"],"value_column":"v","null_policy":"ignore","scale":2,"rounding":"half_even"}'

The machine-readable contract is at /v1/tools/table-decimal-group-average/versions/1.0.0.

CLI

node cli.mjs run table-decimal-group-average 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.