sql-standards

Reference SQL style, correctness, performance, and anti-pattern avoidance standards.

3|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/MayaDispeler/TheOrqestra --skill sql-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-standards
Source: https://github.com/MayaDispeler/TheOrqestra/tree/main/skills/sql-standards
Command: npx skills add https://github.com/MayaDispeler/TheOrqestra --skill sql-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a comprehensive guide to writing production-grade SQL, addressing style, correctness, performance, and anti-pattern avoidance.

Core Features & Use Cases

  • SQL Standards: Offers a dense reference for SQL style, correctness, performance, and anti-pattern avoidance.
  • Mental Models: Provides mental models for writing efficient and readable SQL queries.
  • Non-Negotiable Standards: Lists essential rules for writing SQL queries, such as explicit column lists, qualifying column references, and avoiding logic in the WHERE clause.
  • Style Standards: Demonstrates good SQL practices with examples.
  • Decision Rules: Offers guidelines for common SQL scenarios like deduplication, most recent record retrieval, and date comparisons.
  • Common Mistakes: Identifies and explains common SQL mistakes and their correct alternatives.
  • Vocabulary: Defines key SQL terms to enhance understanding.

Quick Start

Use the sql-standards skill to review and optimize your SQL queries for best practices.

Frequently Asked Questions about sql-standards

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

FAQPage Schema
What are the SQL best practices for writing production-grade queries?

SQL best practices for production-grade queries involve following standards for style, correctness, performance, and anti-pattern avoidance. This includes using explicit column lists, qualifying references, and avoiding logic in the WHERE clause to ensure query quality and efficiency.

How do I avoid common SQL anti-patterns and mistakes in my database code?

To avoid common SQL anti-patterns and mistakes, reference established decision rules for scenarios like deduplication, most recent record retrieval, and date comparisons. Identifying these frequent errors and applying their correct alternatives ensures robust database operations.

What mental models help with SQL query optimization and readability?

Mental models for SQL query optimization focus on structuring queries for maximum performance and readability. They provide cognitive frameworks that help developers naturally write efficient queries while adhering to non-negotiable style and correctness standards.

Do I need to know basic database query optimization to apply these SQL style standards?

Yes, applying these SQL style standards requires an existing understanding of SQL syntax and basic query optimization principles. The guide targets SQL developers and database administrators who need to ensure query quality and efficiency in production environments.

When should I use explicit column lists instead of SELECT * in SQL?

You should always use explicit column lists instead of SELECT * as a non-negotiable SQL standard. This practice improves query correctness, prevents unexpected schema change errors, and enhances overall query performance by reducing unnecessary data retrieval.