select and the dal literal.

Generated from the language definition for language 1.0.

select and dal

A query is query <name>[(<param>: <type>, …)] = select …, or = dal { … } when the statement is written out.

query       := "query" ident ["(" param ("," param)* ")"] "=" ("select" selectbody | "dal" jsonlit)
param       := ident ":" type
selectbody  := projlist "from" source ["where" expr] ["by" identlist] ["having" expr]
               ["sort" ident ("asc"|"desc") ("," ident ("asc"|"desc"))*] ["limit" int] ["offset" int]
projlist    := "*" | proj ("," proj)*        proj := ident | agg "(" ident ")" | agg "(" "*" ")"
source      := ident | "jobs" | "event_log" | "fsm_schemas"