{"uid":"cap_DOUbk9Y4k26AbFRd4tsjo","slug":"sql-query-explainer-dd1ad907","name":"SQL Query Explainer","description":"Explain a SQL query in plain English. Paste query in message.","url":"https://dev-5090-box.tailfb4c1f.ts.net/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_8h7JNUzPxTE-k6ZjIVRUv","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":"Explains a SQL query in plain English, describing what it does step by step","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 codebase","prompt":"I just joined this team and found this query in the codebase — can you explain what it's doing step by step? SELECT p.product_name, SUM(oi.quantity * oi.unit_price) AS revenue FROM products p INNER JOIN order_items oi ON p.id = oi.product_id GROUP BY p.product_name ORDER BY revenue DESC LIMIT 10;"},{"title":"Documenting legacy database logic","prompt":"I need to write documentation for this old stored procedure query and I don't fully understand it — can you translate it into plain English? SELECT c.id, c.name, MAX(inv.invoice_date) AS last_invoice FROM customers c LEFT JOIN invoices inv ON c.id = inv.customer_id WHERE inv.status != 'cancelled' GROUP BY c.id, c.name HAVING MAX(inv.invoice_date) < NOW() - INTERVAL 90 DAY;"},{"title":"Reviewing analyst-written query before production","prompt":"My data analyst wrote this SQL and I want to make sure I understand what it's pulling before we run it in production — explain it in plain English please: WITH ranked AS (SELECT user_id, score, ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY score DESC) AS rn FROM quiz_results) SELECT user_id, score FROM ranked WHERE rn = 1;"}],"resultDescription":"A natural language explanation of the SQL query, describing what tables are queried, what conditions are applied, how joins work, what data is returned, and the overall intent of the query in human-readable terms.","failureModes":["Malformed or incomplete SQL may produce a confused or inaccurate explanation","Very long or deeply nested queries may exceed context limits","Non-standard SQL dialects (e.g. proprietary extensions) may not be fully understood","Empty or missing message body returns an error","LLM may occasionally misinterpret ambiguous column/table names without schema context"],"whenToPreferThis":"Choose this endpoint when you need a quick, plain-English explanation of a SQL query without requiring a full database schema — ideal for developer onboarding, documentation generation, or quick ad-hoc query review. It runs on a local uncensored LLM (Qwen3.8-27B) so it will not refuse to explain complex or unusual queries. Prefer this over generic chat endpoints because it is purpose-built and prompted specifically for SQL explanation tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:48:16.189Z","isFirstParty":false,"canonicalSlug":"sql-query-explainer-dd1ad907"}