Hi I have the output of results like this :
?name ?o ?x
------------
ABCD xyz ghh
PQR xyz hij
how do I combine the columns ?o and ?x into one column called papers? I need the output to be like this :
?name ?papers
--------------
ABCD (xyz, ghh, hij)
Note that PQR and ABCD are replaced only by ABCD. ABCD and PQR have the same property called mbox_sha1sum
The above two were examples. I need them to be like so:
This is the current sparql query :
PREFIX xmlns: <http://xmlns.com/foaf/0.1/>
PREFIX ontoware: <http://swrc.ontoware.org/ontology#>
SELECT DISTINCT ?name ?x ?o
WHERE {
?s xmlns:mbox_sha1sum ?hash.
?s xmlns:made ?o.
?s xmlns:name ?name.
?o ontoware:year "2009".
?r xmlns:mbox_sha1sum ?hash.
?r xmlns:made ?x.
?x ontoware:year "2008".
}
I need to basically combine ?o and ?x into one column called ?papers If it helps, ?s and ?r have different IRI