query-39a9a71d0f3a1fe6f5a3e0a6c3ae2640

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item ?item_name ?country_name ?coords WHERE {
  {?item wdt:P31/wdt:P279* wd:Q515} UNION {?item wdt:P31/wdt:P279* wd:Q3957} .
  ?item rdfs:label ?item_name. FILTER(LANG(?item_name) = "fr") .
  FILTER(STRENDS(?item_name, "ovie")) .
  OPTIONAL {
      ?item wdt:P17 ?country .
      ?country rdfs:label ?country_name. FILTER(LANG(?country_name) = "en") .
  }
  OPTIONAL {
      ?item wdt:P625 ?coords .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?coords"):::projected v4("?country") v2("?country_name"):::projected v3("?item"):::projected v1("?item_name"):::projected a1((" ")) a2((" ")) c7(["wd:Q3957"]):::iri c6(["wd:Q515"]):::iri f0[["ends-with(?item_name,'ovie')"]] f0 --> v1 f1[["?item_name = 'fr'"]] f1 --> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c6 end union0r <== or ==> union0l end v3 --"rdfs:label"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P17".-> v4 v4 --"rdfs:label"--> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P625".-> v5 end