query-875c117c2bd961ce55076abde4c7a314

rq turtle/ttl

request to add YOB and/or YOD to TP descriptions (2021-09-01) Jura1: Request date: 1 September 2021, byTask descriptionMany TP imported items have a description in the form "Peerage person ID=\d*". These were added when these items didn't include more information. . To make it easier to identify them, the years from these dates should be added to the description. (P570)date of death and/or (P569)date of birth In the meantime, some of these items include Query to find items (currently 28776): .[1]Sample edit:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?d
{

  ?item wdt:P4638 [] .
  ?item (wdt:P569|wdt:P570) [] .
  ?item schema:description ?d . 
  FILTER( lang(?d) && regex (?d, "^Peerage person ID=\\d+$") ) 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?d"):::projected v2("?item"):::projected a1((" ")) a2((" ")) c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?dregex(?d,'^Peerage person ID=\d+$')"]] f0 --> v1 v2 --"wdt:P4638"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P570"--> a2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P569"--> a2 end union0r <== or ==> union0l end v2 --"schema:description"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end