Related to the answer of a previous question of mine (see [1]) I have a new
question: I currently have a CONSTRUCT query with a nested SELECT which makes
use of aggregates. What I now want to do is to construct new URIs in the
CONSTRUCT statement.
What I want to do is basically similar as can be seen in [2]. There I see that
BIND is used in the WHERE class to construct new URIs which are then used in
the CONSTRUCT clause. Unfortunately this approach does not work for my case
(nested SELECT which resides in the CONSTRUCT's WHERE clause). The difference
is, that in this example no nested SELECT is present.
My current query looks like this (simplified):
PREFIXES
CONSTRUCT { ?s rdfs:label ?var . }
WHERE {
SELECT ?s (AVG(?single) as ?agg) ...
WHERE {
...
}
GROUP BY ?s ...
}
The question is: Where to place a BIND statement which is used to bind values
to variables, which are then used in the CONSTRUCT statement (e.g. ?var)?
Thanks for your help.
Best,
Peter
[1]
https://mail-archives.apache.org/mod_mbox/jena-users/201511.mbox/%[email protected]%3E
[2]
http://mail-archives.apache.org/mod_mbox/jena-users/201111.mbox/%[email protected]%3E