A data analyst needs to understand why a complex SQL query joining five tables is not returning expected results. She wants a step-by-step explanation of the query logic and identification of potential issues. Which Databricks Assistant command should she use in the SQL Editor?
Answer & explanation
Correct answer: C
WHY C: The /explain command is designed for step-by-step query walkthroughs, which makes it the right tool for understanding complex logic and diagnosing unexpected results.
WHY NOT A: /help lists the available Assistant commands and documentation links; it does not analyze or explain the query in the editor.
WHY NOT B: /generate creates a new query from a natural language description; it does not interpret an already-written query.
WHY NOT D: /optimize focuses on performance, rewriting the query for efficiency; it does not explain what the query does semantically.
WHY NOT E: /fix tries to repair syntax or logic errors and return a working version; it does not narrate the query's logic step by step.