SELECT select_options FROM { table_name [ [ AS ] correlation_name ] | join | ( subquery ) [ AS ] derived_table_name [ ( column_name_list ) ] | table_function | table_operator | analytic_function [ AS ] correlation_name } [, ...] other_options
Syntax Elements
- select_options
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
- table_name
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
- correlation_name
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
- subquery
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
- derived_table_name
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
- column_name_list
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
- analytic_function
- The name of the ML Engine function to be run. See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003.
- on_clauses
on_clause [ on_clause... ]
- on_clause
{ partition_any_input | partition_attributes_input | dimensional_input }
- partition_any_input
table_input [ PARTITION BY ANY [ ORDER BY order_expr_list ] ]
- partition_attributes_input
table_input PARTITION BY expr_list [ ORDER BY order_expr_list ]
- dimensional_input
table_input DIMENSION [ ORDER BY order_expr_list ]
- table_input
ON table_expression [ [ AS ] alias ]
- order_expr_list
order_expr [ , … ]
SQL expression on which to sort rows going into the function. The expression can specify the numeric position of the expression in the expression list with a name or constant.
- order_expr
expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]
Each order_expr can be specified to sort either ascending (ASC) or descending (DESC). Ascending order is the default. Each order_expr can specify whether null values appear before (NULLS FIRST) or after (NULLS LAST) non-null values. By default, null values sort as if larger than non-null values (NULLS FIRST is default for DESC order and NULLS LAST is default for ASC order).
- table_expression
{ table_name | (subquery) | analytic_function }
- table_name
- Name of a table, queue table, derived table, or view.
- output_table
OUT TABLE alias (table_name)
- subquery
- A SELECT expression that is nested within another SQL statement or expression.
- other_options
- See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003 for information on semantic requirements for ML Engine analytic functions.