Is it possible to use aggregates in a SPARQL CONSTRUCT query? If yes, how?
I have the following (simplified) query which works:
CONSTRUCT { 
    ?s ei:number ?number .
}
FROM <http://example.org>
WHERE { 
    ?s ei:number ?number
} 
However, since ?number has multiple solutions, I would like to calculate the aggregate. I tried it like this:
CONSTRUCT { 
    ?s ei:number AVG(?number) .
}
FROM <http://example.org>
WHERE { 
    ?s ei:number ?number
} 
The SPARQL Query Validator raises the following error:
Encountered " "avg" "AVG "" at line 3, column 14.
Was expecting one of:
     ...
     ...
     ...
     ...
     ...
     ...
    "true" ...
    "false" ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
    "(" ...
     ...
    "[" ...
     ...
Hence, my question is: (How) can I use aggregates in SPARQL CONSTRUCT queries?