query-9300006da57c71552995084802da718a
Bisexual people age chat
Use at
- https://query.wikidata.org/sparql
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#>
#defaultView:AreaChart
SELECT ?age (count(*) as ?c) WHERE {
?item wdt:P91 wd:Q43200;
wdt:P31 wd:Q5;
wdt:P21 ?gender.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P569 ?birth .
BIND(YEAR(NOW())-YEAR(?birth) AS ?age)
MINUS {
?item wdt:P570 ?mort .
}
FILTER(?age < 120)
} GROUP BY ?age
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?age"):::projected
v4("?birth")
v6("?c")
v3("?gender")
v2("?item")
v5("?mort")
c8(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c3(["wd:Q43200"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?age < '120^^xsd:integer'"]]
f0 --> v5
v2 --"wdt:P91"--> c3
v2 --"wdt:P31"--> c5
v2 --"wdt:P21"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
v2 --"wdt:P569"--> v4
bind1[/"year-from-dateTime(NOW()) - year-from-dateTime(?birth)"/]
v4 --o bind1
bind1 --as--o v5
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P570"--> v5
end
bind4[/"count(*)"/]
bind4 --as--o v6