query-c5cb18d1c69574454948126b70fb49c3
PPEscientist(P21)sex or gender
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?gender ?genderLabel (COUNT(?board_member) AS ?count)
{
wd:Q155718 wdt:P527 ?item.
?item p:P3320 ?board_member_statement.
?board_member_statement a wikibase:BestRank.
?board_member_statement ps:P3320 ?board_member.
FILTER NOT EXISTS { ?board_member_statement pq:P582 []. } # There must be no endtime
OPTIONAL { ?board_member wdt:P21 ?gender. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,en". }
}
GROUP BY ?gender ?genderLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?board_member"):::projected
v1("?board_member_statement")
v5("?count")
v4("?gender"):::projected
v2("?item")
a1((" "))
c10(["bd:serviceParam"]):::iri
c6(["wikibase:BestRank"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,de,en"]):::literal
c2(["wd:Q155718"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0a1
e0v1("?board_member_statement"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"p:qualifier/P582"--> a1
c2 --"p:direct/P527"--> v2
v2 --"p:P3320"--> v1
v1 --"a"--> c6
v1 --"p:statement/P3320"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P21".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind2[/"count(?board_member)"/]
v3 --o bind2
bind2 --as--o v5