query-122e99dbabb462846e0ed645586cf0bb
Gender queries (again)Thanks for the examples (now archived)! I am still working on collecting the data with SPARQL and keep getting timeouts now. See for example this query to find how many items are gendered male in English Wikipedia:
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT (COUNT(?item) AS ?cnt) WHERE {
?item wdt:P21 wd:Q6581097.
FILTER EXISTS { ?wen schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?cnt")
v2("?item"):::projected
v1("?wen")
c3([https://en.wikipedia.org/]):::iri
c5(["wd:Q6581097"]):::iri
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:isPartOf"--> e0c3
e0v2("?item"):::projected
e0v1("?wen"):::projected
e0c3([https://en.wikipedia.org/]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
f0 --> c2
f0 --> c3
v1 --"schema:about"--> v2
v1 --"schema:isPartOf"--> c3
v2 --"wdt:P21"--> c5
bind2[/"count(?item)"/]
v2 --o bind2
bind2 --as--o v3