query-a73efc33e82dbf9cddfb79a8c058888e
Propertiesinstance of (P31)sex or gender (P21)occupation (P106)
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel (COUNT(?occ) AS ?occC) WHERE {
?person wdt:P31 wd:Q5 ;
wdt:P21 wd:Q6581072 ;
wdt:P106 wd:Q17361147 ;
wdt:P106 ?occ.
MINUS {
?person schema:description ?desc.
FILTER(LANG(?desc) = "fr")
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?person ?personLabel
HAVING (?occC = 1)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?desc")
v3("?occ"):::projected
v5("?occC")
v2("?person"):::projected
c5(["wd:Q6581072"]):::iri
c7(["wd:Q17361147"]):::iri
c11(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?occC = '1^^xsd:integer'"]]
f0 --> v5
v2 --"wdt:P31"--> c3
v2 --"wdt:P21"--> c5
v2 --"wdt:P106"--> c7
v2 --"wdt:P106"--> v3
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
f2[["?desc = 'fr'"]]
f2 --> v4
v2 --"schema:description"--> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind4[/"count(?occ)"/]
v3 --o bind4
bind4 --as--o v5