query-417a74300cec1343c71c40e44b306a17
Famous people categorised into eye and hair color Famous people categorised into eye and hair color Personnes célèbres en fonction de la couleur des yeux et des cheveux Famous people categorised into eye and hair color Famous people categorised into eye and hair color Bekende personen in de categorieën oog- en haarkleur Kända personer kategoriserade efter ögon- och hårfärg Famous people categorised into eye and hair color Famous people categorised into eye and hair color Famous people categorised into eye and hair color
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:TreeMap
SELECT ?eyes ?hairColorLabel (COUNT(?person) as ?count)
WHERE
{
?person wdt:P1340 ?eyeColor.
?person wdt:P1884 ?hairColor.
?person wdt:P2048 ?height.
?eyeColor rdfs:label ?_eyeColorLabel.
FILTER((LANG(?_eyeColorLabel)) = "en")
BIND(CONCAT(?_eyeColorLabel, " eyes") AS ?eyes)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?eyes ?hairColorLabel
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/es
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/fr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/hy
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/ja
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/nl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/tr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/uk
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/zh
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?_eyeColorLabel")
v7("?count")
v3("?eyeColor")
v6("?eyes"):::projected
v4("?hairColor")
v5("?height")
v2("?person"):::projected
c7(["bd:serviceParam"]):::iri
c1(["en"]):::literal
f0[["?_eyeColorLabel = 'en'"]]
f0 --> v1
v2 --"wdt:P1340"--> v3
v2 --"wdt:P1884"--> v4
v2 --"wdt:P2048"--> v5
v3 --"rdfs:label"--> v1
bind1[/"concat(?_eyeColorLabel,' eyes')"/]
v1 --o bind1
bind1 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c1
end
bind3[/"count(?person)"/]
v2 --o bind3
bind3 --as--o v7