query-1bb8cca3c599bdcf7ff169251ac343fc
Non-list items that don't have a label in Finnish,
but there is a main category that has a label in Finnish and that category has a return link to the item.
SELECT ?item ?itemLabel ?category ?categoryLabelFR WHERE { ?item wdt:P910 ?category. ?category wdt:P301 ?item. ?category rdfs:label ?categoryLabelFR filter (lang(?categoryLabelFR) = "fi") . FILTER NOT EXISTS {?item wdt:P31/wdt:P279* wd:Q13406463 } . FILTER NOT EXISTS {?item rdfs:label ?itemLabelFR filter (lang(?itemLabelFR) = "fi")} . } LIMIT 1000
Use at
- https://query.wikidata.org/sparql
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#>
# Non-list items that don't have a label in Finnish,
# but there is a main category that has a label in Finnish and that category has a return link to the item.
SELECT ?item ?itemLabel ?category ?categoryLabelFR WHERE {
?item wdt:P910 ?category.
?category wdt:P301 ?item.
?category rdfs:label ?categoryLabelFR filter (lang(?categoryLabelFR) = "fi") .
FILTER NOT EXISTS {?item wdt:P31/wdt:P279* wd:Q13406463 } .
FILTER NOT EXISTS {?item rdfs:label ?itemLabelFR filter (lang(?itemLabelFR) = "fi")} .
}
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?category"):::projected
v3("?categoryLabelFR"):::projected
v2("?item"):::projected
v1("?itemLabelFR")
a1((" "))
c5(["wd:Q13406463"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?itemLabelFR = 'fi'"]]
e0f0 --> e0v1
e0v2 --"rdfs:label"--> e0v1
e0v2("?item"):::projected
e0v1("?itemLabelFR"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> c2
f1[["?itemLabelFR = 'fi'"]]
f1 --> v1
v2 --"rdfs:label"--> v1
f2[["not "]]
subgraph f2e1["Exists Clause"]
e1v1 --"wdt:P31"--> e1a1
e1a1 --"wdt:P279"--> e1c3
e1v1("?item"):::projected
e1a1((" ")):::projected
e1c3(["wd:Q13406463"]):::iri
end
f2--EXISTS--> f2e1
f2 --> v2
f2 --> c3
f2 --> a1
f2 --> c4
f2 --> c5
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
f3[["?categoryLabelFR = 'fi'"]]
f3 --> v3
v2 --"wdt:P910"--> v4
v4 --"wdt:P301"--> v2
v4 --"rdfs:label"--> v3