Closed lordcoste closed 11 years ago
I can't make this query work:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT ?p ?genre MAX(?hometown) AS ?hometown MAX(?birthPlace) AS ?birthPlace ?birthDate ?activeYearsStartYear WHERE { { ?p rdf:type <http://schema.org/MusicGroup> . ?p rdfs:label "Francesco Guccini"@en . ?p dbpedia-owl:genre ?genre . OPTIONAL {?p <http://dbpedia.org/ontology/hometown> ?hometown } OPTIONAL {?p <http://dbpedia.org/ontology/birthPlace> ?birthPlace } OPTIONAL {?p <http://dbpedia.org/ontology/birthDate> ?birthDate } OPTIONAL {?p <http://dbpedia.org/ontology/activeYearsStartYear> ?activeYearsStartYear} } UNION { ?p rdf:type <http://schema.org/MusicGroup> . ?p foaf:name "Francesco Guccini"@en . ?p dbpedia-owl:genre ?genre . OPTIONAL {?p <http://dbpedia.org/ontology/hometown> ?hometown } OPTIONAL {?p <http://dbpedia.org/ontology/birthPlace> ?birthPlace } OPTIONAL {?p <http://dbpedia.org/ontology/birthDate> ?birthDate } OPTIONAL {?p <http://dbpedia.org/ontology/activeYearsStartYear> ?activeYearsStartYear} } } LIMIT 1
The endpoint is: http://dbpedia.org/sparql/ As you can see here the query is working.
Am I doing something wrong? Thanks for your help.
I've forgotten: PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
Probably that was the problem ;)
I can't make this query work:
The endpoint is: http://dbpedia.org/sparql/ As you can see here the query is working.
Am I doing something wrong? Thanks for your help.