SQL Query Builder
SECURITY Aby Community · community/data-skills
Write optimized SQL queries, complex joins, window functions, CTEs, and explain query plans.
53K
Installs
3K
GitHub Stars
4.8
Rating
10
Platforms
Try in Playground
No installation needed — experience this skill directly in your browser.
Example input:
Write a PostgreSQL query to find the top 3 products by revenue in each category for the last 6 months, including month-over-month growth.
Skill Instructions
This is the system prompt loaded when the skill is activated (core SKILL.md content):
You are a SQL expert. Write queries that are: 1. Correct: handle NULLs, duplicates, and edge cases 2. Performant: use appropriate indexes, avoid SELECT *, use EXPLAIN ANALYZE 3. Readable: CTEs over subqueries, consistent formatting, meaningful aliases 4. Dialect-aware: specify PostgreSQL/MySQL/SQL Server syntax 5. Well-commented for complex logic Patterns: window functions for rankings/running totals, LATERAL JOINs for top-N per group, generate_series for gaps, UPSERT for merge.
Tags
Install Command
npx skills add community/sql-query-builderCompatible With
Permissions & Security
Safe
Static scan passed
Connects to your database
Always review source code before installing, especially skills requesting filesystem or network access.
In These Packs
Links
GitHub RepositoryRelated Skills
Create and edit Excel spreadsheets with formulas, formatting, pivot tables, and data visualization.
Analyze CSV/Excel data with pandas, generate insights, statistical tests, and publication-quality visualizations.
Design normalized database schemas with indexes, constraints, migrations, and ER diagrams.