query-208e24b2dd0571484cd3a9bb2bfc2b7d
Propertiessex or gender (P21)
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "fr.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "links";
mwapi:titles "Sociologie";.
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item)
?item wdt:P21 ?gender .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?gender")
v1("?item"):::projected
c12(["mwapi:item"]):::iri
c4(["fr.wikipedia.org"]):::literal
c2(["bd:serviceParam"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["links"]):::literal
c10(["Sociologie"]):::literal
c6(["Generator"]):::literal
f0[["bound(?item)"]]
f0 --> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:endpoint"--> c4
c2 --"mwapi:api"--> c6
c2 --"mwapi:generator"--> c8
c2 --"mwapi:titles"--> c10
v1 --"mwapi:apiOutputItem"--> c12
end
v1 --"wdt:P21"--> v2
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c16
end