SQL Query Writing Skill
Translate analysis questions into SQL using the supplied schema and dialect.
What this skill does
Schema interpretation
Identify tables, keys, relationships and available fields from your actual schema.
Dialect-aware queries
Write filters, joins, aggregations and ordering for the specified database.
Query review
Explain assumptions, suggest validation cases and consider performance implications for larger datasets.
What to provide & what you get
- Input
- The database dialect, schema and exact business question
- Expected output
- SQL queries with assumptions and checks against the supplied schema
Community source
Upstream source
Open the upstream instructions at the fixed revision used for this resource. Review the source and its supporting files before installing.
Read upstream SKILL.md- Repository
- phuryn/pm-skills
- File
pm-data-analytics/skills/sql-queries/SKILL.md- Revision
07b34f64ee828df08953f505b7f747aef85ae7c6
The downloaded SKILL.md text matches this upstream entrypoint. Review the ZIP’s source and license records for the complete packaging details.
Installation
- Download and extract the ZIP. Keep each complete skill folder, including its supporting files. Do not copy only
SKILL.md. - Copy the skill folder into your agent's skills directory. Use the project path below for this project, or the personal path for all your projects.
Codex
- This project
.agents/skills/sql-queries/SKILL.md- All your projects
~/.agents/skills/sql-queries/SKILL.md
Claude Code
- This project
.claude/skills/sql-queries/SKILL.md- All your projects
~/.claude/skills/sql-queries/SKILL.md
- Check the final path. It must match one of the paths above, with one
sql-queries/folder directly underskills/. Avoid an extra ZIP-name folder around it. - Start a new task in your project. Use the matching example below to invoke the installed skill. If it is missing, recheck the folder name and reopen your agent.
Before the first run
- A database schema, SQL dialect and analysis question
The ZIP installs the skill instructions and bundled files. Any listed software, accounts or external tools need their own setup.
What's in the download
3 files across 1 skill folder. Includes sql-queries/SKILL.md.
File integrity (SHA256):
0a02adf82c5c23a98da36852465213266a43c4f180c5a7d7a109bac47ff550a2How to use
- Provide the SQL dialect, schema and the precise question to answer.
- Ask for the query, a plain-language explanation and small validation cases.
- Review and test it against a suitable database environment before using results.
Try it in your agent
Install first, then attach or provide the inputs described above. Replace any bracketed placeholders before running.
Codex
Use $sql-queries. Write a read-only SQL query for this question, explain assumptions and identify schema details that are missing.
Claude Code
/sql-queries Write a read-only SQL query for this question, explain assumptions and identify schema details that are missing.
Check the result: Verify joins and aggregation grain to avoid duplicated rows or misleading totals.



