4.4.3 Relation expression

Organization of this subsection
(1) Format
(2) Function
(3) Operands
(4) Syntax rules
(5) Notes
(6) Usage example

(1) Format

relation-expression::=SELECT-clause[Figure]FROM-clause[[Figure]WHERE-clause]
               [[Figure]GROUP-BY-clause[[Figure]HAVING-clause]][[Figure]UNION-clause]

(2) Function

Searches the data from one or more relations and filters the search results.

(3) Operands

SELECT-clause

For details about specifying the SELECT clause, see 4.4.4 SELECT clause.

FROM-clause

For details about specifying the FROM clause, see 4.4.5 FROM clause.

WHERE-clause

For details about specifying the WHERE clause, see 4.4.6 WHERE clause.

GROUP-BY-clause

For details about specifying the GROUP BY clause, see 4.4.7 GROUP BY clause.

HAVING-clause

For details about specifying the HAVING clause, see 4.4.8 HAVING clause.

UNION-clause

For details about specifying the UNION clause, see 4.4.9 UNION clause.

(4) Syntax rules

Enter the details of the relation expression in an inquiry. Specify a search method and a filtering method after the SELECT clause and the FROM clause, respectively.

(5) Notes

None.

(6) Usage example

Outputs the data in column a where the value of column b in relation s1 is less than 20. The underlined part indicates the relation expression.

REGISTER QUERY q1 SELECT s1.a FROM s1[ROWS 100] WHERE s1.b < 20;