SQL keywords

This list includes keywords currently supported by Network Reporting.

as

Provides a local alias for a SQL expression.

expression AS output_name

asc

Ascending; usually used in an ORDER BY clause.

ORDER BY expression ASC

desc

Descending; usually used in an ORDER BY clause.

ORDER BY expression DESC

distinct

Eliminates duplicate rows from a table.

SELECT DISTINCT column_name, ...

explode as

Enables a query to incorporate multiple related fields in Network as if they were a single field in the expression. For more information, see Field groups.

SELECT ... EXPLODE [field_set] AS [alias] ... FROM [table]

from

Derives a table from one or more other tables given in a comma-separated table reference list.

FROM table_reference [, table_reference [, ...]]

on

Evaluates a Boolean condition. Can be used in conjunction with the JOIN types.

table1 JOIN table2 ON table1_column = table2_column

using

Specifies the column to use when two identical tables are joined. Supported in the FROM clause.

The USING syntax can be used only when the join_column from the two tables are identical.

Supported in the following commands:

  • INNER JOIN (or just JOIN)

  • LEFT (OUTER) JOIN

  • RIGHT (OUTER) JOIN

table1 INNER JOIN table2 [ ON table1_column = table2_column | USING (join_column [, ...] ) ]