query-f6ff2c201447d741f25c1bd2e28ceb83

rq turtle/ttl

TODO

Use at

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#>
select
  ?item
  (group_concat(distinct ?p21lLabel; separator=", ") as ?p21Label) 
  (group_concat(distinct ?p27lLabel; separator=", ") as ?p27Label) 
where {
  hint:Query hint:optimizer "None".
  values ?item {%s}
  optional {?item wdt:P21 ?p21_.}
  optional {?item wdt:P27 ?p27_.}
  service wikibase:label {
    bd:serviceParam wikibase:language "de,[AUTO_LANGUAGE]".
    ?p21_ rdfs:label ?p21_Label.
    ?p27_ rdfs:label ?p27_Label.
  } hint:Prior hint:runLast false.
  bind(coalesce(?p27_Label, "style="background:#ff0000;"|"@en) as ?p21lLabel)
}
group by ?item

Query found at