query-6bc6b96d6ed2ce0cadabcde3d66a68ea
Occupation of people born between Oct 23 1900 and Nov 22 1900
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 ?occupation ?occupationLabel (COUNT(?occupation) AS ?count) WHERE{
?person wdt:P31 wd:Q5;
wdt:P106 ?occupation;
wdt:P569 ?birth.
OPTIONAL {?person wdt:P570 ?death.}
FILTER(("1900-10-22"^^xsd:date <= ?birth) && (?birth < "1900-11-23"^^xsd:dat)).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
GROUP BY ?occupation ?occupationLabel
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?birth")
v6("?count")
v5("?death")
v4("?occupation"):::projected
v3("?person")
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;"]):::literal
c4(["wd:Q5"]):::iri
f0[["'1900-10-22^^xsd:date' <= ?birth?birth < s1900-11-23^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f0 --> v2
v3 --"wdt:P31"--> c4
v3 --"wdt:P106"--> v4
v3 --"wdt:P569"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P570".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind2[/"count(?occupation)"/]
v4 --o bind2
bind2 --as--o v6