# Database Query Runs – Numeric Row Ordering

> Database Query Runs – Numeric Row Ordering is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Sorts up to 200 database query run records by a chosen numeric field (execution_ms or rows_scanned) and returns a ranked, ordered report for local descriptive analytics.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-ar-analytics-database-query-runs-sort?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/database-query-runs-numeric-row-ordering-1fb6ac53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2aJZvdQSCqJhtgmQXS8xI

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability database-query-runs-numeric-row-ordering-1fb6ac53 -d '<json body>'
```

Example prompt: Sort these 4 database query run records by execution_ms and give me the numeric row ordering report: row-1 on 2026-10-01 in group-a took 10ms and scanned 1 row, row-2 on 2026-10-02 in group-b took 20ms and scanned 2 rows, row-3 on 2026-10-03 in group-a took 15ms and scanned 3 rows, row-4 on 2026-10-04 in group-b took 30ms and scanned 4 rows.

## When to prefer this

Choose this endpoint when you have up to 200 database query run records and need a simple, cheap ($0.01 USDC) numeric sort/rank by execution time or rows scanned with no external enrichment, forecasting, or complex aggregation. Ideal for lightweight local analytics pipelines, quick performance triage, or agent-driven database observability tasks where you just need ranked ordering of query data.

## Known failure modes

- Empty rows array (minItems:1 violated) returns validation error
- More than 200 rows submitted (maxItems:200 violated) returns error
- Invalid date format (not YYYY-MM-DD) causes schema validation failure
- Missing required fields (row_id, database, date, execution_ms, rows_scanned) triggers error
- Invalid field enum value (not 'execution_ms' or 'rows_scanned') causes rejection
- Null numeric values may result in null-aware ordering behavior

## How this service works

Database query runs - Numeric row ordering: Numeric row ordering for Database query runs. Up to 200 supplied typed records. Local descriptive analytics; no enrichment or forecast. One of 25 new profiles across 20 shared operations in this industry. 0.01 USDC includes one bounded numeric row ordering report.

## Output

A bounded numeric row ordering report listing the supplied database query run records ranked/sorted by the chosen numeric field (execution_ms or rows_scanned), up to 200 rows. The output is a local descriptive analytics report with no enrichment or forecasting — pure rank ordering of the submitted data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "row_id",
     "database",
     "date",
     "execution_ms",
     "rows_scanned"
    ],
    "properties": {
     "date": {
      "type": "string",
      "default": "",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "maxLength": 10
     },
     "row_id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "database": {
      "type": "string",
      "default": "",
      "maxLength": 80
     },
     "execution_ms": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     },
     "rows_scanned": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "date": "2026-10-01",
     "row_id": "row-1",
     "database": "group-a",
     "execution_ms": 10,
     "rows_scanned": 1
    },
    {
     "date": "2026-10-02",
     "row_id": "row-2",
     "database": "group-b",
     "execution_ms": 20,
     "rows_scanned": 2
    },
    {
     "date": "2026-10-03",
     "row_id": "row-3",
     "database": "group-a",
     "execution_ms": 15,
     "rows_scanned": 3
    },
    {
     "date": "2026-10-04",
     "row_id": "row-4",
     "database": "group-b",
     "execution_ms": 30,
     "rows_scanned": 4
    }
   ],
   "maxItems": 200,
   "minItems": 1
  },
  "field": {
   "enum": [
    "execution_ms",
    "rows_scanned"
   ],
   "type": "string",
   "default": "execution_ms"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/database-query-runs-numeric-row-ordering-1fb6ac53/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
