query-568ec11b6f457cb894c84d5c284090f9
Popular eye colors among humans
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#>
#title:Popular eye colors among humans
# illustrates bubblechart view, count
#defaultView:BubbleChart
SELECT ?eyeColor ?eyeColorLabel ?rgb (COUNT(?human) AS ?count)
WHERE
{
?human wdt:P31 wd:Q5.
?human wdt:P1340 ?eyeColor.
OPTIONAL { ?eyeColor wdt:P465 ?rgb. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
GROUP BY ?eyeColor ?eyeColorLabel ?rgb
ORDER BY DESC(?count)
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/en
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v3("?eyeColor"):::projected
v2("?human"):::projected
v4("?rgb"):::projected
c6(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
v2 --"wdt:P31"--> c2
v2 --"wdt:P1340"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P465".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"count(?human)"/]
v2 --o bind1
bind1 --as--o v5