query-3c563194ebc2dfd71ca33bbb8e25ba5b

rq turtle/ttl

TODO

Use at

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#>
SELECT ?errata ?errataLabel ?itemLabel ?item
WHERE 
{
  ?errata wdt:P31 wd:Q1348305 .                  # ?errata is an errata
  filter not exists {?itemZ wdt:P2507 ?errata . } # there's no ?item pointing to the errata.
  ?errata rdfs:label ?errataLabel . filter(lang(?errataLabel)="en")
  filter(strstarts(?errataLabel,"Erratum:"))
  bind(replace(?errataLabel,"Erratum: ","") as ?itemLabel) .
  ?item rdfs:label ?itemLabel.
  filter(strlen(?itemLabel)>20)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?errata"):::projected v2("?errataLabel"):::projected v5("?item"):::projected v5("?itemLabel"):::projected v3("?itemZ") c6(["wd:Q1348305"]):::iri f0[["string-length(?itemLabel) > '20^^xsd:integer'"]] f0 --> v5 f1[["starts-with(?errataLabel,'Erratum:')"]] f1 --> v2 f2[["?errataLabel = 'en'"]] f2 --> v2 f3[["not "]] subgraph f3e0["Exists Clause"] e0v1 --"wdt:P2507"--> e0v2 e0v2("?errata"):::projected e0v1("?itemZ"):::projected end f3--EXISTS--> f3e0 f3 --> v3 f3 --> c4 f3 --> v4 v3 --"wdt:P2507"--> v4 v4 --"wdt:P31"--> c6 v4 --"rdfs:label"--> v2 bind4[/"replace(?errataLabel,'Erratum: ','')"/] v2 --o bind4 bind4 --as--o v5 v5 --"rdfs:label"--> v5