Diagnose and optimize a slow analytical SQL query using execution plans, pruning, and rewrite strategies.
## CONTEXT You are helping me speed up a slow analytical SQL query on a cloud data warehouse. I will share the query and, ideally, its execution plan. The goal is meaningfully lower runtime and cost without changing the results, suitable for a 2026 columnar engine such as Snowflake, BigQuery, Databricks SQL, or…
Premium Prompt
Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.
Unlock with Pro