query-f6713f331178eed855992eee618d36ad

rq turtle/ttl

Add info about subject to items with generic title "obituary"

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?pubvenueLabel
{
    ?item wdt:P31 wd:Q13442814 . 
    { ?item rdfs:label "OBITUARY"@en } UNION { ?item rdfs:label "Obituary"@en }
    FILTER NOT EXISTS { ?item wdt:P921 [] }
    OPTIONAL { ?item wdt:P1433 ?pubvenue }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?pubvenue") a1((" ")) c5([sOBITUARY^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal c3(["wd:Q13442814"]):::iri c9(["bd:serviceParam"]):::iri c6([sObituary^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal c11(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P921"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"wdt:P921"--> a1 v1 --"wdt:P31"--> c3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"rdfs:label"--> c6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"rdfs:label"--> c5 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1433".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end