{"uid":"cap_Mr8eq7vCfI1fZh_VNdyed","slug":"sql-query-explainer-plain-english-4cae56c5","name":"SQL Query Explainer (Plain English)","description":"Explain a SQL query in plain English. Paste query in message.","url":"https://pearl-valium-stickers-upc.trycloudflare.com/v1/sql-explain?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"usage":{"type":"object"},"choices":{"type":"array"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aQzLy6S8TtzfYIkRhT5L_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Takes a raw SQL query as input and returns a plain-English explanation of what it does, served by a local uncensored LLM.","exampleAgentPrompt":"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;","exampleUseCases":[{"title":"Onboarding junior developer to legacy schema","prompt":"I'm a junior dev trying to understand this gnarly legacy query — can you explain in plain English what it's doing? SELECT p.product_name, SUM(oi.quantity * oi.unit_price) AS revenue FROM order_items oi JOIN products p ON oi.product_id = p.id JOIN orders o ON oi.order_id = o.id WHERE o.status = 'completed' AND o.created_at BETWEEN '2023-01-01' AND '2023-12-31' GROUP BY p.product_name ORDER BY revenue DESC LIMIT 10;"},{"title":"Documenting a data pipeline query","prompt":"I need to document what this SQL does for our internal wiki — please explain it in plain English so non-technical stakeholders can understand: WITH ranked AS (SELECT user_id, action, ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY created_at DESC) AS rn FROM events) SELECT user_id, action FROM ranked WHERE rn = 1;"},{"title":"Auditing an unfamiliar SQL migration script","prompt":"We inherited this migration script and I'm not sure what it's actually changing in our database — explain this SQL to me in plain English so I can decide if it's safe to run: ALTER TABLE sessions ADD COLUMN last_active TIMESTAMP DEFAULT NOW(), DROP COLUMN token_version, ADD INDEX idx_user_last (user_id, last_active);"}],"resultDescription":"A plain-English narrative explanation of the SQL query — describing what tables are involved, what filtering and joining is happening, what the query returns, and the overall intent — suitable for non-technical readers or documentation purposes.","failureModes":["Empty or missing query body returns a generic error or empty explanation","Malformed SQL may produce a confused or hallucinated explanation without flagging syntax errors","Very long queries may be truncated or produce incomplete explanations","Cloudflare tunnel may be offline or rate-limited, returning 402 or 5xx","Payment failure (insufficient USDC or x402 protocol mismatch) blocks the request"],"whenToPreferThis":"Choose this endpoint when you need a fast, private, plain-English explanation of a SQL query without sending data to a third-party cloud LLM. Especially useful for sensitive database schemas or proprietary queries that shouldn't leave your environment. Prefer this over generic chat LLMs when you want a pay-per-call, no-subscription model with local inference.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:36:58.268Z","isFirstParty":false,"canonicalSlug":"sql-query-explainer-plain-english-4cae56c5"}