Doradus Query Language (DQL) : Link Clauses : Link Path Clauses

Link Path Clauses
A clause can search a field of an object that is related to the perspective object by using a link path. The general form of a link path is:
field1.field2...fieldN
The field names used in a link path must follow these rules:
The first field (field1) must be a link field defined in the query’s perspective table.
Each secondary field (field2 through fieldN) must be a field that belongs to the extent table of the prior (immediate left) link field. That is, field2 must be a field owned by the extent table of field1, field3 must be owned by extent table of field2, and so forth.
If the second-to-last field (fieldN-1) is a timestamp field, the last field can be a timestamp subfield (YEAR, HOUR, etc.)
The right-most field in the link path is the comparison field. The type of the target value(s) in the clause must match the type of the comparison field. For example, if the comparison field is an integer, the target values must be integers; if the comparison field is a link, the target values must be object IDs; etc. Implicit quantification occurs for every field in the path. Consider these examples:
Manager.Name : Fred
Sender.MessageAddress.Domain.Name = 'hotels.com'
DirectReports.DirectReports.FirstName = [Fred TO Wilma}
In order, these examples are interpreted as follows:
A perspective object (a Person) is selected if at least one of its manager’s name contains the term Fred.
A perspective object (a Message) is selected if it has at lease one sender with at least one address with at lease one domain named hotels.com.
A perspective object (a Person) is selected if at least one direct report has at least one second-level direct report whose FirstName is >= Fred but < Wilma.