query-8631dcebaee5568ba0c9ce5416b868fd

rq turtle/ttl

TODO items containing a name without property named after that person I would like have a query which lists items containing a specific string (e.g. "Sandro Pertini") and a flag to understand if that item has property named after that specific person (wd:Q1233),

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  ?item ?itemLabel ?itemDescription WHERE {
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

  ?item rdfs:label  "Sandro Pertini"@en. 
    FILTER NOT EXISTS { ?item  wdt:P138 wd:Q1233;}

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected c4(["bd:serviceParam"]):::iri c6(["en"]):::literal c8([sSandro Pertini^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal c2(["wd:Q1233"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P138"--> e0c2 e0v1("?item"):::projected e0c2(["wd:Q1233"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"wdt:P138"--> c2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end v1 --"rdfs:label"--> c8