query-49e013167b49dc741b8e6779a1f70416

rq turtle/ttl

display item and label SELECT ?item ?enLabel ?enDescription ?deLabel ?deDescr WHERE { # instance of standard Unix utility ?item wdt:P31 wd:Q18343316. # missing description in english optional { ?item schema:description ?enDescription FILTER(LANG(?enDescription) = "en") . } optional { ?item rdfs:label ?enLabel FILTER(LANG(?enLabel) = "en") } optional { ?item schema:description ?deDescription FILTER(LANG(?deDescription) = "de") . } optional { ?item rdfs:label ?deLabel FILTER(LANG(?deLabel) = "de") } filter (!(bound(?enDescription) && bound(?enLabel) && bound(?deDescription) && bound(?deLabel)))

# at least one sitelink is a WP article in any language filter exists { ?article schema:about ?item FILTER (SUBSTR(str(?article), 11, 15) = ".wikipedia.org/") . }

}

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# display item and label
SELECT ?item ?enLabel ?enDescription ?deLabel ?deDescr
WHERE {
  # instance of standard Unix utility
  ?item wdt:P31 wd:Q18343316. 
  # missing description in english
  optional {
    ?item schema:description ?enDescription FILTER(LANG(?enDescription) = "en") .
  }
  optional {
    ?item rdfs:label ?enLabel FILTER(LANG(?enLabel) = "en") 
  }
  optional {
    ?item schema:description ?deDescription FILTER(LANG(?deDescription) = "de") .
  }
  optional {
    ?item rdfs:label ?deLabel FILTER(LANG(?deLabel) = "de") 
  }
  filter (!(bound(?enDescription) && bound(?enLabel) && bound(?deDescription) && bound(?deLabel)))

  # at least one sitelink is a WP article in any language
  filter exists { ?article schema:about ?item FILTER (SUBSTR(str(?article), 11, 15) = ".wikipedia.org/") . }

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?article") v5("?deDescription") v6("?deLabel"):::projected v3("?enDescription"):::projected v4("?enLabel"):::projected v2("?item"):::projected c8(["wd:Q18343316"]):::iri f0[[" "]] subgraph f0e0["Exists Clause"] e0f0[["substring(str(?article),'11^^xsd:integer','15^^xsd:integer') = '.wikipedia.org/'"]] e0f0 --> e0v1 e0v1 --"schema:about"--> e0v2 e0v1("?article"):::projected e0v2("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c4 f0 --> v2 f1[["substring(str(?article),'11^^xsd:integer','15^^xsd:integer') = '.wikipedia.org/'"]] f1 --> v1 v1 --"schema:about"--> v2 f2[["not bound(?enDescription)bound(?enLabel)bound(?deDescription)bound(?deLabel)"]] f2 --> v3 f2 --> v4 f2 --> v5 f2 --> v6 v2 --"wdt:P31"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."schema:description".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."schema:description".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v6 end