SQL Query Complexity Analyzer

Know Your Query Before It Hits Production

Paste any SQL query and instantly get a complexity score, clause breakdown, anti-pattern detection, performance red flags, and actionable optimization tips β€” all without running a single query.

Complexity Score Anti-Pattern Detection Optimization Tips Ctrl+Enter to Analyze
SQL Query
Works with SELECT, CTEs, subqueries, JOINs, window functions and more.
Complexity Score
β€” /100
Paste a query to get your complexity score
0 JOINs
0 CTEs
0 Subqueries
0 Window Fns
0 Aggregates
0 Clauses
Clause Breakdown
Run analysis to see clause breakdown
Anti-Patterns Detected 0
Anti-patterns and performance red flags will appear here after analysis.
Optimization Tips 0
Actionable optimization suggestions will appear here after analysis.
Scoring Reference
1–25
Simple Basic SELECT, single table, no JOINs
26–50
Moderate 1–2 JOINs, filters, GROUP BY
51–75
Complex CTEs, subqueries, 3+ JOINs, HAVING
76–90
Advanced Window fns, nested CTEs, complex logic
91–100
Extreme Anti-patterns, deep nesting, high risk