Writing your First Query

Working with analytics, you'll spend most of your time in the Query Panel, writing SQL and saving it to your Aginity catalogs. This tutorial will give you an overview of all the needed functionality and features to create your queries. To open the Query Panel, click on the Create a new tab link shown on the application's main screen or hit the (+) symbol at the top left corner of the main screen.

mceclip0.pngmceclip2.png

  1. You can set each separate tab to run for a different database connection in Aginity. After opening a new tab, click on the arrow near the Select connection field and choose a database platform you want to edit.

mceclip3.png

  1. Once you establish the needed connection, as shown below, you can work with the Query Panel like a text editor using SQL syntax specific to a selected database.

mceclip4.png

  1. When you're done with writing your code, you have several options to run it that include:

mceclip5.png

Execution Type

Description

Run Script at Cursor Position

Aginity will run the statement from where the cursor is placed until the semicolon when executing your query.

Run All Parts of the Script in a Sequence

Aginity will run each statement in the tab sequentially and show the results of each statement in the output. If the statement was a SELECT, the application will display the results panel.

Run Entire Script as a Batch

Aginity will run an entire script in the tab and show unified results for the batch. 

Explain Plan

Aginity supports Explain functionality for DB2. Check the link for details.

Abort query

After executing a query, you can direct Aginity to request the database to cancel it.

🔎 TIP: "Run as Batch" - is required in case procedure code is called in a query

🔎 TIP: One of the biggest challenges in SQL is learning the different functional syntax from different database vendors. We want to help you simplify this process by providing the SQL reference manuals we support .

 

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request