That query does not look valid to me. There is no 'b' that is defined in the FROM clause. Once an alias for a node is created in the FROM clause, as in COMPOSITION a[..] the alias 'a' in the FROM and WHERE clauses refers to the same matching data node.
I would not assume anything based on the query you've given because that query is invalid as far as I can see. On Mon, Oct 8, 2018 at 7:06 PM Georg Fette <georg.fe...@uni-wuerzburg.de> wrote: > Hello, > I have another question concerning the semantics of AQL queries: > In the documentation there are queries of the form > SELECT a/data[at0001]/items[at0004]/value > FROM EHR e CONTAINS COMPOSITION a[openEHR-EHR-COMPOSITION.encounter.v1] > WHERE b/data[at0001]/items[at0004]/value/value >= 140 > What ensures that the identified path in the SELECT section references > the same data instances that are contrained with the same identified > path in the WHERE section ? It could be argued that there is only one > "data[at0001]" in "b" and only one "items[at0004]" in "a/data[at0001]" > and so on. But is this already the full explanation for the expression > to be unambiguous ? The aliases used in queries (e.g. "a") ensures that > a reference to an alias definitely means the same instance. Looking at > queries like the one above let assume that aliases are only syntactic > sugar and are not functionally needed. Is this correct ? > Greetings > Georg > > -- > --------------------------------------------------------------------- > Dipl.-Inf. Georg Fette Raum: B001 > Universität Würzburg Tel.: +49-(0)931-31-85516 > Am Hubland Fax.: +49-(0)931-31-86732 > 97074 Würzburg mail: georg.fe...@uni-wuerzburg.de > --------------------------------------------------------------------- > > > _______________________________________________ > openEHR-implementers mailing list > openEHR-implementers@lists.openehr.org > > http://lists.openehr.org/mailman/listinfo/openehr-implementers_lists.openehr.org >
_______________________________________________ openEHR-implementers mailing list openEHR-implementers@lists.openehr.org http://lists.openehr.org/mailman/listinfo/openehr-implementers_lists.openehr.org