query-72c1943bfddfcbc5eb6feae7a071339e
Propertiessexual orientation (P91)sex or gender (P21)date of birth (P569)position held (P39)occupation (P106)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT
?person
?label
?date
WHERE {
{ ?person wdt:P91 ?orientation .} UNION {
{VALUES ?gender {wd:Q1097630 wd:Q303479 wd:Q189125 wd:Q1052281 wd:Q2449503 wd:Q48270 #wd:Q1399232 wd:Q3277905 wd:Q746411 wd:Q350374 wd:Q660882
} .
?person wdt:P21 ?gender . }
}
VALUES (?earliest) {("01-01-01T00:00:00Z"^^xsd:dateTime)}
VALUES (?latest) {("1910-01-01T00:00:00Z"^^xsd:dateTime)}
?person wdt:P569 ?date .
FILTER (?date >= ?earliest)
FILTER (?date <= ?latest)
{?person wdt:P39 ?role .} UNION { ?person wdt:P106 wd:Q82955 .}
?person rdfs:label ?label.
FILTER(LANG(?label) = "en").
}
ORDER BY DESC(?date)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?date"):::projected
v8("?earliest")
v7("?gender")
v2("?label"):::projected
v8("?latest")
v6("?orientation")
v5("?person"):::projected
v8("?role")
c7(["wd:Q82955"]):::iri
f0[["?label = 'en'"]]
f0 --> v2
f1[["?date <= ?latest"]]
f1 --> v1
f1 --> v8
f2[["?date >= ?earliest"]]
f2 --> v1
f2 --> v8
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind3[/VALUES ?gender/]
bind3-->v7
bind30(["wd:Q1097630"])
bind30 --> bind3
bind31(["wd:Q303479"])
bind31 --> bind3
bind32(["wd:Q189125"])
bind32 --> bind3
bind33(["wd:Q1052281"])
bind33 --> bind3
bind34(["wd:Q2449503"])
bind34 --> bind3
bind35(["wd:Q48270"])
bind35 --> bind3
v5 --"wdt:P21"--> v7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v5 --"wdt:P91"--> v6
end
union0r <== or ==> union0l
end
bind4[/VALUES ?earliest/]
bind4-->v8
bind40(["01-01-01T00:00:00Z^^xsd:dateTime"])
bind40 --> bind4
bind5[/VALUES ?latest/]
bind5-->v8
bind50(["1910-01-01T00:00:00Z^^xsd:dateTime"])
bind50 --> bind5
v5 --"wdt:P569"--> v1
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v5 --"wdt:P106"--> c7
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v5 --"wdt:P39"--> v8
end
union1r <== or ==> union1l
end
v5 --"rdfs:label"--> v2