Chapter 6 Query Language Components : Select Clause

Select Clause
In the select clause, you specify the columns that will appear in the query results. In the example below, a select clause projects two columns, address and name, which are properties of the concept /customer. The alias for the customer concept is the letter c:
select c.name, c.address from /customer c
You can also give each projection an alias, for example:
select c.name as name
The use of the optional "as" makes the code more readable.
In the select clause you can use the following:
Entities that are declared in the from clause, unless you are using a group by clause (see Group by Clause)
You can use an optional limit clause to specify the maximum number of rows to return, and you can use an offset to ignore the first n rows.
You can use an optional distinct clause to prevent the query from returning duplicate rows.
Examples of Select Clauses
These examples show only the select clause. A complete query requires a select and a from clause.
select A.*
select {limit: first 10} A.name
select /#DateTime/now() as C
select /RuleFunctions/GetState() as D
select /#String/concat(B.customerId,”ABC”) as E
select B.*, A.custId id, B@extId as extId