query-c0b14d6e3d4dee220ce117ccacd7480d
find items with "cricket" in label, but no P641
SELECT ?item
{
?item wdt:P31 wd:Q29791211 .
FILTER NOT EXISTS { ?item wdt:P641 [] }
?item rdfs:label ?l .
FILTER ( CONTAINS(lcase(str(?l)), "cricket") )
}
Use at
- https://query.wikidata.org/sparql
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#>
#find items with "cricket" in label, but no P641
SELECT ?item
{
?item wdt:P31 wd:Q29791211 .
FILTER NOT EXISTS { ?item wdt:P641 [] }
?item rdfs:label ?l .
FILTER ( CONTAINS(lcase(str(?l)), "cricket") )
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?l")
a1((" "))
c4(["wd:Q29791211"]):::iri
f0[["contains(lower-case(str(?l)),'cricket')"]]
f0 --> v1
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --"wdt:P641"--> e0a1
e0v1("?item"):::projected
e0a1((" ")):::projected
end
f1--EXISTS--> f1e0
f1 --> v2
f1 --> c2
f1 --> a1
v2 --"wdt:P641"--> a1
v2 --"wdt:P31"--> c4
v2 --"rdfs:label"--> v1