query-0b6cfaa6feb9621418efc9c6ca0b7f29

rq turtle/ttl

Mulitple hair colors of entities with a AniDB Character ID. select distinct ?AniDB_character_ID ?item ?itemLabel ?hair_color ?hair_colorLabel ?second_hair_color ?second_hair_colorLabel where { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?item wdt:P5648 ?AniDB_character_ID. ?item wdt:P1884 ?hair_color, ?second_hair_color filter(?hair_color != ?second_hair_color) . }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Mulitple hair colors of entities with a AniDB Character ID.
select distinct ?AniDB_character_ID ?item ?itemLabel ?hair_color ?hair_colorLabel ?second_hair_color ?second_hair_colorLabel where { 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P5648 ?AniDB_character_ID.
  ?item wdt:P1884 ?hair_color, ?second_hair_color
  filter(?hair_color != ?second_hair_color) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?AniDB_character_ID"):::projected v1("?hair_color"):::projected v3("?item"):::projected v2("?second_hair_color"):::projected c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?hair_color != ?second_hair_color"]] f0 --> v1 f0 --> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v3 --"wdt:P5648"--> v4 v3 --"wdt:P1884"--> v1 v3 --"wdt:P1884"--> v2