query-validation

Validate SQL queries for correctness, performance, and best practices.

351|70|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/nimrodfisher/data-analytics-skills --skill query-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: query-validation
Source: https://github.com/nimrodfisher/data-analytics-skills/tree/main/01-data-quality-validation/query-validation
Command: npx skills add https://github.com/nimrodfisher/data-analytics-skills --skill query-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SQL queries often harbor correctness gaps, performance issues, and misapplied business logic. This Skill enables automated auditing to catch logical errors, suboptimal patterns, and schema mismatches before deployment.

Core Features & Use Cases

  • Automated correctness review: Detect faulty joins, incorrect aggregations, and misuse of window functions.
  • Performance guidance: Flag expensive operations, suggest indexing, and refactoring opportunities.
  • Business logic validation: Ensure results align with defined rules and expected outcomes.
  • Use Case: When analysts review a complex multi-join query, this Skill highlights where results may diverge from expectations and suggests fixes.

Quick Start

Review the SQL query you want to validate and provide context about the target database and schemas.

Frequently Asked Questions about query-validation

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

FAQPage Schema
How do I validate SQL query correctness before deployment?

To validate SQL query correctness, you can audit the query for logical errors, faulty joins, and incorrect aggregations to catch schema mismatches and misapplied business logic before deployment.

What are common SQL performance issues and best practices for complex queries?

Common SQL performance issues include expensive operations and suboptimal join patterns. Applying query validation best practices flags these issues, suggests indexing, and identifies refactoring opportunities.

Does automated SQL query validation work with Snowflake and BigQuery?

Automated SQL query validation works with Snowflake, BigQuery, PostgreSQL, MySQL, and Redshift, validating joins, aggregates, and business logic across these similar database engines.

How can I check if my SQL aggregations and window functions are correct?

You can check SQL aggregations and window functions by applying an automated correctness review that detects misuse of window functions, faulty joins, and incorrect aggregations.

What context do I need to provide to review a complex multi-join SQL query?

To review a complex multi-join SQL query, provide the query text, the target database type, and the relevant database schemas to receive a structured validation report with recommended fixes.