LucidDbQueryStatement

From Eigenpedia

Jump to: navigation, search

Syntax

query-statement ::= query-expression [ ORDER BY order-by-item, ... ]
order-by-item ::= value-expression [ ASC | DESC ]
query-expression ::= leaf-query-expression [ setop-expression ... ]
leaf-query-expression ::=
select-expression
| explicit-table-expression
| explicit-values-expression
setop-expression ::= set-operator [ DISTINCT | ALL ] leaf-query-expression
set-operator ::=
UNION
| INTERSECT
| EXCEPT

See LucidDbSqlReference#Queries for specification of select-expression, explicit-table-expression, and explicit-values-expression.

See LucidDbValueExpression for specification of value-expression.

Example

SELECT DISTINCT ename, job
FROM timesheet_fact t, employee_dimension e, calendar_dimension c
WHERE t.emp_key=e.emp_key
AND t.workday_key=c.calendar_key
AND c.is_weekend
ORDER BY ename;
Personal tools