Database reference guide

HOME

Queries

Like any standard RDBMS system, Engine allows queries to be executed in order to obtain selection results and summarized data. This section gives an overview of query execution using Engine.

The query object is the processing object used to create and calculate queries using Engine's query language - NSQL. A typical query might be "Give me all records from the Customer table where the Customer has bought Product A". This would be executed using the following syntax:

SELECT * FROM CUSTOMER, TRANSACTIONS WHERE [Transactions].[Product]='A';

The query object can be used to calculate statistical summaries of data, return records matching a specified criteria and generate crosstab like result sets.

NSQL

Engine supports the execution of SQL like queries via its own query language, NSQL.

NSQL has many features in common with ANSI-SQL as well some extensions to improve its use for data analysis.

The result that is generated from an NSQL query depends on the type of query that has been executed. It is possible to generate the following result types:

  • Domains (Recordsets - generated from Select statements)
  • Single column values (generated from aggregate calculations)
  • Sheets (tabular results - generated from GROUP By statements)

Domain and Sheet results are always "owned" by a table. The values that they contain relate to the records in a particular table.

NSQL statements must be terminated by a semi-colon (;)

Queries can be executed via the iLoader interface.

JOINS

As mentioned previously in the Links section, it is not necessary to specify join criteria when executing a query. The join information will be automatically extracted from the pre-built links present in the system.

Delete

It is possible to delete data from a table by using the DELETE keyword in a query.

Operational Elements of a Query

The following table summarizes the key operational elements of Engine Query objects.

Query Owner Table Table that owns the result of the query. For counts, determines what the counts are referring to. For functions, determines from which table the summarized records are obtained.
  Select Clause field(s) Fields to be included in the results of the query. Must be viewable at the Owner Table of the Query.
  Where/Having Clause field(s) Fields included in the query filter. Must be linked to the Owner Table of the query.
  Group By Clause field The X Axis of the Crosstab-like results generated by a GROUP BY query.

  Online & Instructor-Led Courses | Training Videos | Webinar Recordings
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice