Running queries on the retrieved data sets

Top  Previous  Next

SQL Data Analysis allows you to run queries on all data sets currently in use.  For e.g. you may have a data set from and Oracle database and another data set from a PostgrSQL database.  You can easily write a SQL query to select rows from both data sets.

 

You can run queries across all the data sets you are currently using in your analysis tables, by selecting the Query data sets item on the Data Controllers panel.

 

sda_vquery01

 

Each data set used in your analysis tables are listed on the right, and are also displayed in the results area.

 

sda_vquery02

 

In the example above, we have 2 data sets in use (ds1 contains the sales header data, ds2 contains the sales order lines).  We can reference them using the names ds1 and ds2 respectively in our query.  The SQL syntax used is identical to that used in SQLite.  For a full list of the SQLite syntax, please refer here.

 

For example, we can write the following query to retrieve the total quantity and value of each sales order:

 

sda_vquery03

 

Once the query has completed, you can add the data set to the analysis tables for further analysis.