query-1f10404d58880c2c035c40155c7f035b

rq turtle/ttl

Items with CBDB ID in Wikidata that have been linked to corresponding Wikipedia articles

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?id ?sitelink
WHERE
{
  # items that have CBDB ID
    { ?item wdt:P497 ?id }

  # look for articles (sitelinks) in Chinese ("zh")
    { ?sitelink schema:about ?item . ?sitelink schema:inLanguage "zh" }

  # look for articles (sitelinks) in wikipedia in Chinese ("zh")
   FILTER (SUBSTR(str(?sitelink), 1, 25) = "https://zh.wikipedia.org/")
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?id"):::projected v2("?item") v1("?sitelink"):::projected c7(["zh"]):::literal f0[["substring(str(?sitelink),'1^^xsd:integer','25^^xsd:integer') = 'https://zh.wikipedia.org/'"]] f0 --> v1 v2 --"wdt:P497"--> v3 v1 --"schema:about"--> v2 v1 --"schema:inLanguage"--> c7