What do you mean by failing? At first sight, there should be a common
variable between the first request and the second one to make a joint.


Le 06/12/2017 à 19:31, Kingsley Idehen a écrit :
> Hi Everyone,
>
> Does anyone know why the SPARQL-FED query at:
> http://tinyurl.com/ycc2tkp3, is failing?
>
> Query Text:
>
> PREFIX wd: <http://www.wikidata.org/entity/>
> PREFIX wdt: <http://www.wikidata.org/prop/direct/>
> PREFIX wikibase: <http://wikiba.se/ontology#>
> PREFIX schema: <http://schema.org/>
> PREFIX bd: <http://www.bigdata.com/rdf#>
> PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
> PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
> PREFIX dbo: <http://dbpedia.org/ontology/>
> PREFIX dct: <http://purl.org/dc/terms/>
>
>
> SELECT ?item ?dbpediaID  ?label ?subjectName ?prominence ?image
> WHERE
> {
>      {
>         SELECT ?item ?itemLabel ?coord ?prominence ?layer ?image
>         WHERE {
>                   ?item wdt:P31 wd:Q8502. # a mountain
>                   ?item wdt:P625 ?coord.
>                   ?item wdt:P17 wd:Q39. # in Switzerland
>                   ?item wdt:P2660 ?prominence .
>                   BIND(
>                     IF(?prominence < 1000, "<1000 metres",
>                     IF(?prominence < 2000, "1000 - 2000 metres",
>                     IF(?prominence < 3000, "2000 - 3000 metres",
>                     IF(?prominence < 4000, "3000 - 4000 metres",
>                     "> 4000 metres"))))
>                     AS ?layer).
>                   OPTIONAL {?item wdt:P18 ?image.}
>                   SERVICE wikibase:label { bd:serviceParam
> wikibase:language "[AUTO_LANGUAGE],en". }
>             }
>            
>         LIMIT 200 }
>    
>    
>     SERVICE <http://dbpedia.org/sparql>
>          {
>             SELECT DISTINCT ?dbpediaID ?name ?label ?subjectName
>             WHERE {
>                     ?dbpediaID owl:sameAs ?item ;
>                     rdfs:label ?label ;
>                     dct:subject ?subject.
>                     FILTER (LANG(?label) = "en")
>                    
>                     ?subject rdfs:label ?subjectName .
>                    
>                   }
>
>           }     
>
> }
>    
>
>
>
> _______________________________________________
> Wikidata mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikidata

_______________________________________________
Wikidata mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to