query-763febf032e4e686941ee4e8a4f93362
Show comedians that are alive and British citizens
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
{
SELECT DISTINCT ?item WHERE {
?item p:P106 ?statement0.
?statement0 (ps:P106/(wdt:P279*)) wd:Q245068.
?item p:P27 ?statement1.
?statement1 (ps:P27/(wdt:P279*)) wd:Q145.
MINUS {
?item p:P12627 ?statement2.
?statement2 (ps:P12627) _:anyValueP12627.
}
MINUS {
?item p:P570 ?statement_3.
?statement_3 psv:P570 ?statementValue_3.
?statementValue_3 wikibase:timeValue ?P570_3.
}
}
LIMIT 100
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?P570_3")
v1("?item"):::projected
v2("?statement0")
v3("?statement1")
v4("?statement2")
v6("?statementValue_3")
v5("?statement_3")
a3((" "))
a1((" "))
a2((" "))
c8(["wd:Q245068"]):::iri
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;"]):::literal
c11(["wd:Q145"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:P106"--> v2
v2 --"p:statement/P106"--> a1
a1 --"p:direct/P279"--> c8
v1 --"p:P27"--> v3
v3 --"p:statement/P27"--> a2
a2 --"p:direct/P279"--> c11
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:P12627"--> v4
v4 --"p:statement/P12627"--> a3
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:P570"--> v5
v5 --"p:statement/value/P570"--> v6
v6 --"wikibase:timeValue"--> v7
end