query-8f9078332cacd41277e41648b81e592f

rq turtle/ttl

All Census Divisions, plus any StatsCan codeStatistics Canada Geographic code (P3012) Should be 293 total. Currently ?too many?

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?statCanCode
WHERE 
{
  ?item wdt:P31 wd:Q18810091.
      OPTIONAL { ?item wdt:P3012 ?statCanCode. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?statCanCode"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;"]):::literal c2(["wd:Q18810091"]):::iri v1 --"wdt:P31"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P3012".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end