query-6387051ee3b83e43e633fca9776b4335
display item and label SELECT ?item ?itemLabel WHERE { # instance of standard Unix utility ?item wdt:P31 wd:Q18343316. # missing description in english FILTER(NOT EXISTS { ?item schema:description ?lang_label. FILTER(LANG(?lang_label) = "de") }) # at least one sitelink is a WP article in any language ?article schema:about ?item . FILTER (SUBSTR(str(?article), 11, 15) = ".wikipedia.org/") . # define used language, label and description for usage above SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?item rdfs:label ?itemLabel. ?item schema:description ?itemDescription } } group by ?item ?itemLabel order by ?itemLabel
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# display item and label
SELECT ?item ?itemLabel
WHERE {
# instance of standard Unix utility
?item wdt:P31 wd:Q18343316.
# missing description in english
FILTER(NOT EXISTS { ?item schema:description ?lang_label. FILTER(LANG(?lang_label) = "de") })
# at least one sitelink is a WP article in any language
?article schema:about ?item . FILTER (SUBSTR(str(?article), 11, 15) = ".wikipedia.org/") .
# define used language, label and description for usage above
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
?item rdfs:label ?itemLabel.
?item schema:description ?itemDescription
}
} group by ?item ?itemLabel order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v4("?item"):::projected
v5("?itemDescription")
v1("?itemLabel"):::projected
v3("?lang_label")
c7(["wd:Q18343316"]):::iri
c12(["en"]):::literal
c10(["bd:serviceParam"]):::iri
f0[["substring(str(?article),'11^^xsd:integer','15^^xsd:integer') = '.wikipedia.org/'"]]
f0 --> v2
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0f0[["?lang_label = 'de'"]]
e0f0 --> e0v1
e0v2 --"schema:description"--> e0v1
e0v2("?item"):::projected
e0v1("?lang_label"):::projected
end
f1--EXISTS--> f1e0
f1 --> v3
f1 --> v4
f1 --> c5
f2[["?lang_label = 'de'"]]
f2 --> v3
v4 --"schema:description"--> v3
v4 --"wdt:P31"--> c7
v2 --"schema:about"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
v4 --"rdfs:label"--> v1
v4 --"schema:description"--> v5
end