query-dc03673582d58d2b53acb69bbb967f8a
South African women on Wikipedia but not on Wikiquote
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?english ?afrik (SAMPLE(?workLabel) AS ?occupation) WHERE {
?item wdt:P27 wd:Q258; wdt:P21 wd:Q6581072
MINUS{ ?englishq schema:about ?item ; schema:isPartOf <https://en.wikiquote.org/> }
MINUS{ ?afrikq schema:about ?item ; schema:isPartOf <https://af.wikiquote.org/> }
OPTIONAL{ ?english schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> }
OPTIONAL{ ?afrik schema:about ?item ; schema:isPartOf <https://af.wikipedia.org/> }
OPTIONAL{?item wdt:P106 ?work}
FILTER (BOUND(?english)|| BOUND(?afrik))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?item rdfs:label ?itemLabel. ?work rdfs:label ?workLabel}
} GROUP BY ?item ?itemLabel ?english ?afrik
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?afrik"):::projected
v5("?afrikq")
v1("?english"):::projected
v4("?englishq")
v3("?item"):::projected
v7("?itemLabel"):::projected
v9("?occupation")
v6("?work")
v8("?workLabel"):::projected
c7([https://en.wikiquote.org/]):::iri
c10([https://af.wikipedia.org/]):::iri
c4(["wd:Q6581072"]):::iri
c8([https://af.wikiquote.org/]):::iri
c2(["wd:Q258"]):::iri
c9([https://en.wikipedia.org/]):::iri
c13(["bd:serviceParam"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["(bound(?english) || bound(?afrik))"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P27"--> c2
v3 --"wdt:P21"--> c4
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v4 --"schema:about"--> v3
v4 --"schema:isPartOf"--> c7
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v5 --"schema:about"--> v3
v5 --"schema:isPartOf"--> c8
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."schema:about".-> v3
v1 --"schema:isPartOf"--> c9
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."schema:about".-> v3
v2 --"schema:isPartOf"--> c10
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P106".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
v3 --"rdfs:label"--> v7
v6 --"rdfs:label"--> v8
end
bind4[/"sample(?workLabel)"/]
v8 --o bind4
bind4 --as--o v9