query-94bd5fb6f45c6f8a07ec23945c37bb29
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?p1559 ?p1559_lang ?p103_lang {
?item wdt:P31 wd:Q5 . # remove this line if you don't want to limit to Q5
?item wdt:P1559 ?p1559 .
BIND(LANG(?p1559) AS ?p1559_lang)
?item wdt:P27 wd:Q17 . #remove this line if you don't want to limit to Japan
?item wdt:P103 ?p103 .
?p103 wdt:P424 ?p103_lang .
FILTER NOT EXISTS {?item wdt:P103/wdt:P424 ?p1559_lang }
FILTER(!CONTAINS(?p1559_lang,CONCAT(?p103_lang,'-'))) # remove this line if you want to see ?p1559_lang like "ja-hani" and "ja-hira" and "zh-hant"
}
ORDER BY ?lang ?p1559_lang
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item"):::projected
v1("?lang")
v6("?p103")
v3("?p103_lang"):::projected
v5("?p1559"):::projected
v6("?p1559_lang"):::projected
a1((" "))
c8(["wd:Q17"]):::iri
c5(["wd:Q5"]):::iri
f0[["not contains(?p1559_lang,concat(?p103_lang,'-'))"]]
f0 --> v6
f0 --> v3
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --"wdt:P103"--> e0a1
e0a1 --"wdt:P424"--> e0v2
e0v1("?item"):::projected
e0v2("?p1559_lang"):::projected
e0a1((" ")):::projected
end
f1--EXISTS--> f1e0
f1 --> v4
f1 --> c2
f1 --> a1
f1 --> c3
f1 --> v6
v4 --"wdt:P103"--> a1
a1 --"wdt:P424"--> v6
v4 --"wdt:P31"--> c5
v4 --"wdt:P1559"--> v5
bind2[/"?p1559"/]
v5 --o bind2
bind2 --as--o v6
v4 --"wdt:P27"--> c8
v4 --"wdt:P103"--> v6
v6 --"wdt:P424"--> v3