Suppose I have a uri http://dbpedia.org/page/Manmohan_Singh now he has a list of years in his tag dbpprop:years.
When I write a query like
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpedia: <http://dbpedia.org/resource/>PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>PREFIX category: <http://dbpedia.org/resource/Category:>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX dbprop: <http://dbpedia.org/property/>PREFIX grs: <http://www.georss.org/georss/>
PREFIX category: <http://dbpedia.org/resource/Category:>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT DISTINCT ?x ?name ?abs ?birthDate ?birthplace ?year ?party ?office ?wiki WHERE {
?x owl:sameAs? dbpedia:Manmohan_Singh.
?x dbpprop:name ?name.
?x dbpedia-owl:birthDate ?birthDate.
?x dbpedia-owl:birthPlace ?birthplace.
?x dbpprop:years ?year.
?x dbpprop:party ?party.
?x dbpedia-owl:office ?office.
?x foaf:isPrimaryTopicOf ?wiki.
?x rdfs:comment ?abs.
FILTER(lang(?abs) = 'en')
}
I get result of each year in different row .. and hence repeating data for other collumns. Is there a way I can get it as a list in just one collumn like all the years in one collumn comma separated or smthng like that?
Similary for the prop dbpedia-owl:office