MicroStrategy ONE

Auto SQL Best Practices

Know your data model Auto SQL doesn't know any details about the structure of your tables and data, it helps to combine the SQL. Understand your data model to fully leverage Auto SQL capabilities. Tables are picked by their name, not the content, meaning you need to understand if the object is sourced from a correct table.

Narrow down Use Add to the Chat and provide tables to the conversation to increase generated SQL quality and response time. Vast schemas can quickly cross the maximum available question size.

Be Specific Provide as many details as possible for your input. Try using the names of columns that exist in your database.

Iterate Build incremental query, add new fields, and give more details on your question—with corrections and adjustments, you can get a good SQL structure that may serve as a starting point for you to continue.

Ensure data quality Auto SQL does not check if columns are empty or nulls. If your prompt returns no rows, verify the quality of data and filtering conditions.