sql-expert

Write, optimize, and design SQL queries and database schemas.

5|Updated Nov 16, 2025
One-click install
npx skills add https://github.com/QuestForTech-Investments/claude-code-skills --skill sql-expert-questfortech-investments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-expert
Source: https://github.com/QuestForTech-Investments/claude-code-skills/tree/main/sql-expert
Command: npx skills add https://github.com/QuestForTech-Investments/claude-code-skills --skill sql-expert-questfortech-investments

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires SQLAlchemy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps engineers write, optimize, and design SQL queries and database schemas.

Core Features & Use Cases

  • Write complex SQL queries with JOINs, subqueries, and window functions.
  • Optimize slow queries using EXPLAIN plans and index recommendations.
  • Design normalized schemas, implement efficient indexing, and plan safe migrations.
  • Debug SQL errors and validate data integrity across multiple databases.

Quick Start

Ask me to generate a complex SQL query with joins and window functions, optimize an existing query, or design a normalized schema and a safe migration plan.

Frequently Asked Questions about sql-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write complex SQL queries with window functions and multiple joins?

To write complex SQL queries, you use JOINs, subqueries, and window functions to aggregate and analyze data across related tables. This Skill generates concrete SQL patterns for PostgreSQL, MySQL, SQLite, and SQL Server to implement these advanced data retrieval tasks.

What is the best way to optimize slow PostgreSQL queries using EXPLAIN plans?

Optimizing slow PostgreSQL queries involves analyzing EXPLAIN plans to identify bottlenecks and applying efficient indexing strategies. This Skill provides index recommendations and performance tuning guidance to resolve query execution delays.

How do I design a normalized database schema and plan safe migrations?

Designing a normalized database schema requires structuring tables to reduce redundancy, while safe migrations need step-by-step execution to prevent data loss. This Skill delivers normalization guidelines and safe migration steps for schema design.

Can I use SQLAlchemy with PostgreSQL and MySQL for database migrations?

Yes, SQLAlchemy integrates with PostgreSQL, MySQL, SQLite, and SQL Server to facilitate schema migrations and data integrity validation. This Skill supports managing migrations across these multiple database environments.

Why does my SQL query return a data integrity error across multiple databases?

SQL queries return data integrity errors when schema constraints or relationships are violated during data operations. This Skill provides debugging guidance to validate data integrity and resolve SQL errors across PostgreSQL, MySQL, SQLite, and SQL Server.