Table decimal group extrema
table-decimal-group-extrema · version 1.0.0 · CSV & tables · free, no key needed
Group table rows by string keys and compute exact decimal extrema results with deterministic ordering.
Use when you need to: group table decimal extrema · exact decimal extrema by category · aggregate decimal extrema by composite key.
Decide before calling
Read the versioned contract and the supported scope below. Reuse table-decimal-group-extrema@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-extrema@1.0.0 for group table decimal extrema. 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
- group table decimal extrema
- exact decimal extrema by category
- aggregate decimal extrema by composite key
- SQL style grouped decimal extrema
- avoid floating point drift in grouped extrema
- deterministic table extrema aggregation
Not supported
- ungrouped scalar array statistics
- binary floating-point inputs
- streaming or window aggregates
Behavior
- Rows are assigned to composite groups by the exact sequence of group_by string values; groups are emitted in first-seen row order.
- Every group key column must exist and contain a well-formed string; value_column must exist and contain a canonical decimal string or null.
- null_policy ignore excludes null values and yields null aggregate fields when a group has no non-null values; error rejects the first null value.
- Decimal inputs use optional minus, canonical integer syntax, and optional fractional digits; results remove trailing fractional zeros and normalize signed zero to 0.
- Equal extrema retain the earliest zero-based input row index; comparison is exact after aligning decimal scales.
Input
rows(array of object, required): max items 10000group_by(array of string, required): min items 1; max items 8; each min length 1; each max length 64value_column(string, required): min length 1; max length 64null_policy(one of "ignore", "error", required)
Output
groups(array of object, required): max items 10000standard_version(constant "IBM General Decimal Arithmetic Specification 1.70; SQL:2016", required)
Limits
- max input bytes: 2097152
- max rows: 10000
- max columns per row: 32
- max group columns: 8
- max column name bytes: 64
- max cell bytes: 256
- max decimal digits: 100
- max decimal scale: 50
- max groups: 10000
- max output bytes: 2097152
Example
Request input:
{
"rows": [
{
"g": "A",
"v": "1"
},
{
"g": "A",
"v": "2"
}
],
"group_by": [
"g"
],
"value_column": "v",
"null_policy": "ignore"
}
Response:
{
"result": {
"groups": [
{
"key_values": [
"A"
],
"row_count": 2,
"value_count": 2,
"minimum": "1",
"maximum": "2",
"minimum_row_index": 0,
"maximum_row_index": 1
}
],
"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-extrema",
"version": "1.0.0",
"input": {
"rows": [
{
"g": "A",
"v": "1"
},
{
"g": "A",
"v": "2"
}
],
"group_by": [
"g"
],
"value_column": "v",
"null_policy": "ignore"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/table-decimal-group-extrema/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"}'
The machine-readable contract is at /v1/tools/table-decimal-group-extrema/versions/1.0.0.
CLI
node cli.mjs run table-decimal-group-extrema 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Table decimal group average: Group table rows by string keys and compute exact decimal average results with deterministic ordering.
- Table decimal group sum: Group table rows by string keys and compute exact decimal sum results with deterministic ordering.
- Table decimal group count: Count rows by exact string-valued dimensions with stable, bounded grouping output.
- Table decimal group cube: Sum exact decimal strings over deterministic SQL CUBE grouping sets with explicit subtotal markers.
- Table decimal group rollup: Sum exact decimal strings over deterministic SQL ROLLUP grouping sets with explicit subtotal markers.
- Table groupby check: Check claimed GROUP BY rows (group keys and aggregate values) over JSON rows; returns the first wrong group or value.