The SQL Query tab provides both a query editor where you can enter a free-form SQL query and a set of tools to assist you in constructing a query.
Open the Query Editor
- Click menu

.
- In the tree view, select a database table.
- Click the New Query button.
- Enter a name for the query in New Query Name.
- Click Continue to open the Query Editor.
Construct an SQL Query
- In the Query Editor, click the SQL Query tab.
- Enter your query, or select query components from the interface as described in Work With the Query Builder.
- If you want to save the query in the current drawing for future use, click Store.
- Click Execute to execute the query and close the dialog box.