query-54b77b654df1644fe330094bb3a92d80
List of intersex people who have children .14:23, 31 December 2018 (UTC)) at contribs • talk (ChristianKl comment was added byunsignedThe preceding – in Wikidata that have children? (Q1097630)intersex (P21)sex or gender Can someone write a query that lists all people with
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item WHERE {
VALUES ?gender { wd:Q48270 wd:Q1097630 }
?item wdt:P21 ?gender .
{
?item wdt:P1971 ?num .
FILTER(?num > 0) .
} UNION {
?item wdt:P40 [] .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?gender")
v2("?item"):::projected
v3("?num")
a1((" "))
bind0[/VALUES ?gender/]
bind0-->v1
bind00(["wd:Q48270"])
bind00 --> bind0
bind01(["wd:Q1097630"])
bind01 --> bind0
v2 --"wdt:P21"--> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P40"--> a1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f1[["?num > '0^^xsd:integer'"]]
f1 --> v3
v2 --"wdt:P1971"--> v3
end
union0r <== or ==> union0l
end