query-bea21e2652fb970787ff7e8e55574274

rq turtle/ttl

Comparison of zh-hans and zh-hant

Use at

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( LANG(?label) = "zh-hant" ) .
  FILTER( BOUND(?label) ) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "zh-hans" }
} 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 c6(["bd:serviceParam"]):::iri c8(["zh-hans"]):::literal c3(["wd:Q13141064"]):::iri f0[["bound(?label)"]] f0 --> v2 f1[["?label = 'zh-hant'"]] f1 --> v2 v1 --"wdt:P106"--> c3 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; c6 --"wikibase:language"--> c8 end bind5[/"?lang"/] v4 --o bind5 bind5 --as--o v5