The JEQL Language Specification

SQL Extensions


JEQL defines extensions to standard SQL to make various processing patterns more convenient, succinct and/or efficient.

SELECT syntax

*-EXCEPT modifier

Starred table expressions (select-all-columns syntax) allows a following EXCEPT (col, col,...) modifier. This allows easily specifiying all columns minus a given set of columns (which is essentially impossible in standard SQL).

Internal WITH clause

Allows computing named expressions which can be used in the SELECT list. This provides better modularity (e.g. avoiding repeated subexpressions), better documentation (by using meaningful names for subexpressions) and reduces code bulk (by factoring out common subexpressions).

(Note: This is not the same thing as the "pre-SELECT" WITH clause, which allows defining named subqueries. JEQL does not need this syntax, since the language already allows naming and chaining of select expressions within scripts.)

LIMIT n and OFFSET n

Allows easily specifying that only a subset of queried rows are to be returned. Supported in some but not all SQL dialects.

TABLE-valued constants

The TABLE ( ( ... ) ( ...) ... ) syntax allows specifying constant values for tabular data in scripts.

Stream-oriented Processing

Aggregate Functions

Data Extraction