1
When using the Direct Database Query function, click SQL Assistant to access the AI SQL assistant.

2
Provide the assistant with the query you would like it to build.

3
Once complete, the assistant will present you with the query, along with an explanation of how it works and some records that satisfy the query.

4
If the query returns the expected results, click Update SQL. Otherwise, you can ask the assistant to make any desired modifications or fixes.
You can also make your own modifications to the query, such as adding ? characters to represent dynamic values.