query-84f3f0767398e3a36c457c1b2bf6d4d7
Chinese labels per ZH-Chinese languages (without yue and wuu)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?plainlabel (GROUP_CONCAT(?lang; separator=", ") as ?langs) WHERE {
{
SELECT ?item WHERE {
?item wdt:P106 wd:Q13141064 .
}
}
OPTIONAL {
?item rdfs:label ?label .
BIND(STR(?label) AS ?plainlabel) .
BIND(LANG(?label) AS ?lang) .
}
FILTER( SUBSTR(LANG(?label), 0, 2) = "zh" ) .
FILTER( BOUND(?label) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} GROUP BY ?item ?itemLabel ?plainlabel ORDER BY ASC(?item)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?label")
v4("?lang"):::projected
v5("?langs")
v3("?plainlabel"):::projected
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
c5(["wd:Q13141064"]):::iri
f0[["bound(?label)"]]
f0 --> v2
f1[["substring(?label,'0^^xsd:integer','2^^xsd:integer') = 'zh'"]]
f1 --> v2
v1 --"wdt:P106"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."rdfs:label".-> v2
bind2[/"str(?label)"/]
v2 --o bind2
bind2 --as--o v3
bind3[/"?label"/]
v2 --o bind3
bind3 --as--o v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind5[/"?lang"/]
v4 --o bind5
bind5 --as--o v5