Presto Analytics : RAQL Queries : Joins and Other Multiple-Dataset Operations
Joins and Other Multiple-Dataset Operations
 
Join: Merge Columns for Dataset Rows
Union: Append Like Datasets
Intersect: Find Common Dataset Members
Except or Minus: Find All Less the Intersection
You can work with multiple datasets in a RAQL query using any of the following operations:
*Join: Merge Columns for Dataset Rows to perform inner joins that combine columns from two or more datasets into the result for rows that match a specific condition. You can also perform natural joins or cross joins, if needed.
*Union: Append Like Datasets to add the rows from two or more datasets into a larger result. The columns and datatypes of all datasets must be identical.
*Intersect: Find Common Dataset Members to find those rows in two or more datasets that are members of all the datasets. The columns and datatypes of all datasets must be identical.
*Except or Minus: Find All Less the Intersection to find those rows in the first dataset that are not members of the second dataset. The columns and datatypes of all datasets must be identical.
The basic query technique to work with multiple datasets uses a separate subquery for each dataset in the form:
subquery-one[ UNION | INTERSECT | EXCEPT | MINUS] subquery-two [... optional additional multi-set operators and additional subqueries ...]
The individual subqueries for each dataset follow the same syntax and rules as usual, with one addition. You may need to include both the dataset and column names in the form dataset-name.column-name to clearly identify a column. (See Valid Names for Datasets, Columns, Aliases, Paths and Functions for more information.)
With Join, this basic query technique is applied within the From clause instead, such as:
SELECT columns-expressionFROM subquery-one[ JOIN] subquery-two [... optional multi-set operator and subqueries ...]WHERE join-condition
Copyright © 2013-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback