{"uid":"cap_QX3sJKNH9TJGDDuDR2qos","slug":"sql-query-explainer-52174a60","name":"SQL Query Explainer","description":"Explain a SQL query in plain English. Paste query in message.","url":"https://linked-aimed-reproduced-changing.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_E5I6kh-oONOs1EB3wqbMA","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 and returns a plain-English explanation of what it 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 engineer understanding legacy queries","prompt":"I just inherited this massive legacy SQL query and have no idea what it does — can you explain it step by step in plain English? SELECT p.product_id, p.name, SUM(s.quantity) AS total_sold FROM products p INNER JOIN sales s ON p.product_id = s.product_id WHERE s.sale_date BETWEEN '2023-01-01' AND '2023-12-31' GROUP BY p.product_id, p.name ORDER BY total_sold DESC LIMIT 10;"},{"title":"Non-technical stakeholder reviewing a report query","prompt":"Our data team sent me this SQL query to generate my weekly sales report but I'm not a developer — can you tell me in plain English what data it's pulling and what the result will look like? SELECT region, SUM(revenue) FROM sales WHERE YEAR(sale_date) = 2024 GROUP BY region;"},{"title":"Code reviewer auditing a pull request","prompt":"I'm reviewing a PR and need to quickly understand what this SQL query is doing before I approve it — can you give me a plain-English summary? DELETE FROM sessions WHERE last_active < NOW() - INTERVAL 30 DAY AND user_id NOT IN (SELECT id FROM users WHERE role = 'admin');"}],"resultDescription":"A plain-English narrative explanation of the SQL query's logic, describing what tables are involved, what filters or joins are applied, what data is returned or modified, and the overall intent of the query.","failureModes":["Malformed or incomplete SQL may produce a confused or inaccurate explanation","Very large or deeply nested queries may be truncated or only partially explained","Dialect-specific SQL (e.g. T-SQL, PL/pgSQL) may not be fully understood","Empty or missing message body returns an error","Network timeouts may occur if the underlying Cloudflare Tunnel is unavailable"],"whenToPreferThis":"Choose this endpoint when you need a fast, affordable natural-language explanation of a SQL query — especially useful for developers onboarding to a new codebase, non-technical users trying to understand reports, or code reviewers auditing database logic. At $0.01 per call it is cost-effective for high-volume developer tooling pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:31:52.950Z","isFirstParty":false,"canonicalSlug":"sql-query-explainer-52174a60"}