sql_expert

Optimize SQL queries, indexing, and schema design for complex workloads.

6|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/platootalp/agents --skill sql-expert-platootalp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql_expert
Source: https://github.com/platootalp/agents/tree/main/apps/engineer/coder/skills/sql_expert
Command: npx skills add https://github.com/platootalp/agents --skill sql-expert-platootalp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SQL querying, performance tuning, and database design are common bottlenecks for developers and data teams. This Skill provides practical guidance to write efficient SQL, optimize queries, and design scalable schemas that meet real-world requirements.

Core Features & Use Cases

  • SQL Writing: Create correct, readable queries that handle complex joins and aggregations.
  • Performance Optimization: Diagnose slow queries, apply indexing strategies, and rewrite plans for better execution.
  • Schema Design: Propose normalized or denormalized models, depending on workload, with guidance on constraints and data types.
  • Use Case: Example: optimize a slow reporting query and design a lean warehouse schema for analytics.

Quick Start

Provide an optimized SQL query and schema design guidance for a given workload and dataset.

Frequently Asked Questions about sql_expert

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

FAQPage Schema
How do I optimize slow SQL queries for complex data workloads?

Optimize slow SQL queries by diagnosing execution plans, applying targeted indexing strategies, and rewriting queries to handle complex joins and aggregations efficiently across transactional and analytical databases.

What's the best way to design a database schema for scalable analytics?

Design a scalable database schema by proposing normalized or denormalized models based on your specific workload, applying appropriate constraints and data types to support lean warehouse architectures for analytical reporting.

When do I need to denormalize my database schema?

Denormalize your database schema when analytical workloads require faster read performance, applying denormalized models to complex data workloads instead of normalized structures used for transactional integrity.

Can I use this for both transactional and analytical database optimization?

Yes, you can apply SQL optimization and schema design guidance to both transactional and analytical databases, addressing real-world data models for complex data workloads across different database types.

Why does my SQL query execution plan show a table scan?

Your SQL query execution plan shows a table scan due to missing indexes or non-sargable query predicates, requiring indexing strategies and query rewrites to improve execution performance and avoid full table scans.

How to write SQL queries that handle complex joins correctly?

Write SQL queries handling complex joins by constructing correct, readable statements that manage complex aggregations and multi-table relationships while satisfying performance diagnostics criteria for scalable data retrieval.