query-3b41a8d5f7f89b14a27862dc88182570

rq turtle/ttl

TODO

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 ?item ?itemLabel ?dob ?HistReg   # These columns, pls. Each column valiable is found in the body of the query except 
                                           # ?itemLabel which is supplied by the wikibase:label service 
WHERE 
{
  ?item wdt:P27 wd:Q20.                    # They're Norwegian
  ?item wdt:P39/wdt:P279* wd:Q37226.       # a teacher, or subclass thereof
  OPTIONAL {?item wdt:P569 ?dob . }        # might have a dob
  OPTIONAL {?item wdt:P4574 ?HistReg . }   # might have a HistReg
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nn,no,en". }
                                           # get me labels in my UI language, and if not then in nn, then in no, then in en 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?HistReg"):::projected v2("?dob"):::projected v1("?item"):::projected a1((" ")) c5(["wd:Q37226"]):::iri c9(["bd:serviceParam"]):::iri c2(["wd:Q20"]):::iri c11(["#91;AUTO_LANGUAGE#93;,nn,no,en"]):::literal v1 --"wdt:P27"--> c2 v1 --"wdt:P39"--> a1 a1 --"wdt:P279"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P4574".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end