JEQL Language Specification

Queries

query-expr ::= select [ distinct ] result-list
[ with with-assign-block ]
[ from from-list ]
[ where expr ]
[ group by table-col-name-list ]
[ order by order-list ]
[ limit Integer ] [ offset Integer ]
result-list ::= result-column { , result-column }
result-column ::= starred-expr | expr [ [ as ] col-name ]
starred-expr ::= ( * | table-name.* )
[ except ( col-name | ( col-name-list ) ) ]
with-assign-block ::= { assignment-statement { assignment-statement } }
from-list ::= from-table [ [ join-type ] join from-table on expr ]
join-type ::= left [ outer ]
| right [ outer ]
from-table ::= ( table-name
| ( select-expr )
| table-value-expr
| function-call
)
[ as table-alias]
table-alias ::= table-name [ ( col-name-list ) ]
tbl-col-name-list ::= tbl-col-name { , tbl-col-name }
col-name-list ::= col-name { , col-name }
order-list ::= tbl-col-name [ sort-direction ] { , tbl-col-name [ sort-direction ] }
sort-direction ::= [ asc | desc ]
col-name ::= Identifier
tbl-col-name ::= [ Identifier . ] Identifier
table-name ::= Identifier

The SELECT statement is used to query tables

To Do:

semantics of result exprs in group-bys

semantics of order

with blocks