# SQL Query Explainer

> SQL Query Explainer is a paid API for AI agents from biz-integral-pull-earrings.trycloudflare.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Accepts a raw SQL query and returns a plain-English explanation of what it does

## Facts

- Endpoint: POST https://biz-integral-pull-earrings.trycloudflare.com/v1/sql-explain?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sql-query-explainer-534991f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Vdc7XdO0dj2WIy-_jX-k3

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 sql-query-explainer-534991f4 -d '<json body>'
```

Example prompt: Can you explain what this SQL query does in plain English? SELECT u.name, COUNT(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at > '2024-01-01' GROUP BY u.name HAVING COUNT(o.id) > 5 ORDER BY order_count DESC;

## When to prefer this

Use this endpoint when you need a fast, on-demand natural language explanation of any SQL statement — especially useful for developers unfamiliar with a codebase, data analysts reviewing legacy queries, or AI agents that need to surface database logic to non-technical stakeholders. Prefer this over general-purpose LLM calls when you want a cost-controlled, per-query microservice with a fixed interface.

## Known failure modes

- Malformed or incomplete SQL may produce an inaccurate or partial explanation
- Very long or highly nested queries may exceed token limits and return truncated output
- Non-standard SQL dialects (e.g. proprietary extensions) may not be explained accurately
- Empty or missing message body returns an error
- Payment failure via x402 returns a 402 status with no explanation

## How this service works

Explain a SQL query in plain English. Paste query in message.

## Output

A natural language explanation of the SQL query, describing what tables are involved, what data is being selected or manipulated, how joins and filters work, and what the overall result set represents — rendered as readable prose suitable for non-SQL experts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "usage": {
   "type": "object"
  },
  "choices": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sql-query-explainer-534991f4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from biz-integral-pull-earrings.trycloudflare.com](https://www.zero.xyz/host/biz-integral-pull-earrings.trycloudflare.com/llms.txt)
