sql-queries turns a business question into a SQL query. It reads a schema file or a description of your tables, confirms the dialect and requirements, writes a commented query, explains how it works and suggests ways to test it and make it faster. A test script with sample data is available on request.
What You Get
- A query with comments on any complex logic
- An explanation of what the query does and how
- Performance notes on indexes, partitioning and large datasets
- Alternative approaches where they apply
- Validation tips, and a test script with sample data on request
Common Use Cases
- Finding users who signed up in the last 30 days with at least five sessions
- Averaging session duration per user for a month
- Building a revenue report by region and tier with year-over-year growth
What Makes It Unique
It starts from your schema. It extracts tables, columns, types, keys and relationships from a file or description and asks which dialect you use, so the query matches your own database and its naming.
Under The Hood
The skill is one SKILL.md of instructions with no bundled scripts. The agent reads any schema file, SQL dump or documentation you upload, then writes the query in the chat or in a script file. It does not connect to a database on its own. It shows example prompts and an output format.