query-0e93bb341fe67144b9f21398af060162
-ii (Male sex or gender (P21)=male (Q6581097))
Use at
- https://query.wikidata.org/sparql
PREFIX gas: <http://www.bigdata.com/rdf/gas#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?taxonName ?personLabel ?genderLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P21 ?gender} .
FILTER((STRENDS(?taxonName, "ii")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?gender")
v3("?item"):::projected
v2("?person")
v1("?taxonName"):::projected
a1((" "))
c3(["gas:program"]):::iri
c16(["Reverse"]):::literal
c12(["2700000^^xsd:integer"]):::literal
c5(["com.bigdata.rdf.graph.analytics.BFS"]):::literal
c21(["bd:serviceParam"]):::iri
c14(["wdt:P171"]):::iri
c7(["wd:Q756"]):::iri
c23(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c10(["20^^xsd:integer"]):::literal
f0[["bound(?person)"]]
f0 --> v2
f1[["ends-with(?taxonName,'ii')"]]
f1 --> v1
subgraph s1["http://www.bigdata.com/rdf/gas#service"]
style s1 stroke-width:4px;
c3 --"gas:gasClass"--> c5
c3 --"gas:in"--> c7
c3 --"gas:out"--> v3
c3 --"gas:maxIterations"--> c10
c3 --"gas:maxVisited"--> c12
c3 --"gas:linkType"--> c14
c3 --"gas:traversalDirection"--> c16
end
v3 --"wdt:P225"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P138".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P138".-> a1
a1 --"wdt:P21"--> v4
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c21 --"wikibase:language"--> c23
end