{"uid":"cap_jmyMwJNQlGS7NQ-XKcvOW","slug":"sql-query-explainer-fe6d1df5","name":"SQL Query Explainer","description":"Explain a SQL query in plain English. Paste query in message.","url":"https://over-arabia-specifically-luxury.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_WyDIo_5O1y7Y-5yRDKpZ0","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 SQL query as input and returns a plain-English explanation of what the query does","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 non-technical stakeholders","prompt":"My manager doesn't know SQL — can you explain this query in plain English so she understands what data it's pulling? SELECT department, AVG(salary) FROM employees WHERE status = 'active' GROUP BY department ORDER BY AVG(salary) DESC;"},{"title":"Debugging an unfamiliar legacy query","prompt":"I inherited this SQL from a previous developer and have no idea what it does — can you walk me through it step by step? SELECT a.customer_id, SUM(b.amount) FROM accounts a INNER JOIN transactions b ON a.id = b.account_id WHERE b.created_at BETWEEN '2023-01-01' AND '2023-12-31' GROUP BY a.customer_id HAVING SUM(b.amount) > 1000;"},{"title":"Code review for a pull request","prompt":"I'm reviewing a PR and want to understand this new SQL query before approving it — what exactly does it do? WITH ranked AS (SELECT *, ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY created_at DESC) AS rn FROM sessions) SELECT * FROM ranked WHERE rn = 1;"}],"resultDescription":"A plain-English narrative explaining what the SQL query does, including what tables are involved, what filtering or aggregation is applied, what data is returned, and the overall intent of the query.","failureModes":["Malformed or incomplete SQL may produce an inaccurate or partial explanation","Very long or deeply nested queries may exceed context limits","Proprietary SQL dialects (e.g. Snowflake-specific syntax) may be misinterpreted","Input that is not a SQL query will likely produce an unhelpful or confused response","Service may be temporarily unavailable due to the Cloudflare tunnel going offline"],"whenToPreferThis":"Use this endpoint when you need a quick, human-readable explanation of a SQL query without setting up a local LLM or paying for a full AI API subscription. Particularly useful for developer tools, code review automation, onboarding workflows, or data documentation pipelines where the sole task is translating SQL into plain language.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:35:14.796Z","isFirstParty":false,"canonicalSlug":"sql-query-explainer-fe6d1df5"}