query-7c3706213fa079587199f97a9e0928b4

rq turtle/ttl

SPARQL-Abfrage: Inseln im Gewässer

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX schema: <http://schema.org/>

SELECT ?p ?pLabel ?p_article ?xLabel ?zLabel WHERE {
   VALUES ?x {wd:Q202199 wd:Q23442 wd:Q1402592 wd:Q28337} # Inselarten
   VALUES ?z {wd:Q183 wd:Q40 wd:Q39}  # Staaten DE, AT, CH     
   ?p wdt:P17 ?z . 
   ?p wdt:P31 ?x FILTER NOT EXISTS {?p wdt:P706 ?xx} # ohne P706
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "de,en" .
   }      
   OPTIONAL {  # add a sitelinked wp:article, if it is on de-wiki
     ?p_article schema:about ?p .
     ?p_article schema:inLanguage "de" .
     FILTER (SUBSTR(str(?p_article), 1, 25) = "https://de.wikipedia.org/")
   }      
 } LIMIT 50

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?p"):::projected v3("?p_article"):::projected v4("?x") v2("?xx") v5("?z") c13(["de"]):::literal c8(["bd:serviceParam"]):::iri c10(["de,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P706"--> e0v2 e0v1("?p"):::projected e0v2("?xx"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"wdt:P706"--> v2 bind1[/VALUES ?x/] bind1-->v4 bind10(["wd:Q202199"]) bind10 --> bind1 bind11(["wd:Q23442"]) bind11 --> bind1 bind12(["wd:Q1402592"]) bind12 --> bind1 bind13(["wd:Q28337"]) bind13 --> bind1 bind2[/VALUES ?z/] bind2-->v5 bind20(["wd:Q183"]) bind20 --> bind2 bind21(["wd:Q40"]) bind21 --> bind2 bind22(["wd:Q39"]) bind22 --> bind2 v1 --"wdt:P17"--> v5 v1 --"wdt:P31"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v1 v3 --"schema:inLanguage"--> c13 end