Navigation:  Query Builder >

Query Types

There are three types of Queries within HGA and a third available in HGA+:

General Query: tabulates data from fields in one or more linked tables for further analysis typically based on specified conditions and is stored as a Query in the project tree,

SQL Query: tabulates data (or actions) based on one or more SQL statements entered directly into the interface

Union Query: tabulates data from similar fields from two or more tables for further analysis typically based on specified conditions and is stored as a Query in the project tree,

Dynamic Station Group Query: generates a station group (i.e. a list of stations) in the project tree based on specified conditions, and

Dynamic Sample Set Query [HGA+ only]: generates a sample set (i.e. a list of samples) in the project tree based on specified conditions.

 

General Query

General Queries can provide a more detailed look at your data, and can be used for quantifying and qualifying any field in the database.

In addition, many of the visualization and data analysis modules use query data sources as data inputs. Using the Query Builder, you can generate General Queries that provide the data for:

Map Layers

Cross section interpretation results

Quality Control Analysis

Well Profiles

3D Interpolation

Reporting

Plot data sources

and more!

 

To create a General Query, select the General Query dropdown option in the New query dialog box. Then define the necessary fields and conditions, and execute the query. Once the query has been saved, the query will appear as a new branch in the project tree, under the Queries branch.

 

Union Query

Union Queries are a special type of selection query that combine similar types of information from multiple tables. A common use case for a union query is to collate time series data from differing tables such as precipitation and water levels into the same table for use in a plot collection.  Similar to a general query, results of a union query are tabulated in the query view when executed.

Union queries are available for use in all of the modules where general queries are available; however, they are particularly useful in the following modules:

Plot Collections

Map Viewer (Plots and Mini Table Callouts)

 

To create a Union Query, select the union query dropdown option in the New query dialog box. Add and define one subquery with the correct number of fields and appropriate conditions to return the desired information to be collated from each of the target tables.  In the root union query, create and map all of the fields to be returned from each subquery - note that the number and type of fields returned must match between the subqueries.  Placeholder values such as null may be used if the data should be empty or are not available from all subqueries (see the example). Once the query has been saved, the query will appear as a new branch in the project tree, under the Queries branch.

 

SQL Query

Union Queries are a special type of selection query that combine similar types of information from multiple tables. A common use case for a union query is to collate time series data from differing tables such as precipitation and water levels into the same table for use in a plot collection.  Similar to a general query, results of a union query are tabulated in the query view when executed.

Union queries are available for use in all of the modules where general queries are available; however, they are particularly useful in the following modules:

Plot Collections

Map Viewer (Plots and Mini Table Callouts)

 

To create a Union Query, select the union query dropdown option in the New query dialog box. Add and define one subquery with the correct number of fields and appropriate conditions to return the desired information to be collated from each of the target tables.  In the root union query, create and map all of the fields to be returned from each subquery - note that the number and type of fields returned must match between the subqueries.  Placeholder values such as null may be used if the data should be empty or are not available from all subqueries (see the example). Once the query has been saved, the query will appear as a new branch in the project tree, under the Queries branch.

 

Dynamic Station Group Query

Dynamic Station Group Queries can be created and executed for the purpose of organizing the stations into meaningful groups.

To create a Station Group Query, select the Dynamic Station Group Query. Then define the necessary conditions, and execute the query. Once the query has been saved, the query will appear as a new branch in the Project Tree, under the Station Groups branch. When selected from the Station Groups branch, the query will be executed and the modules that are linked to the active station group will be updated and relevant information from the stations that meet the conditions specified in the query will be displayed.

 

Please Note: Station Group Queries do not have options for modifying the display fields, or advanced grouping options.

 

Dynamic Sample Set Query [HGA+ only]

Dynamic Sample Set Queries can be created and executed for the purpose of organizing samples into meaningful sets.

To create a Sample Set Query, select the Dynamic Sample Set Query type when creating a new query. Then define the necessary conditions, and execute the query. Once the query has been saved, the query will appear as a new branch in the Project Tree, under the Sample Sets branch. When selected from the Sample Sets branch, the query will be executed and the modules that are linked to the active sample set will be updated and relevant information from the samples that meet the conditions specified in the query will be displayed.

 

Please Note: Sample Set Queries do not have options for modifying the display fields, or advanced grouping options.

 

 


Page url:https://www.waterloohydrogeologic.com/help/hga/index.html?queries_types.htm