query-6796be6d58ec82d4ff1c00fd1570555d

rq turtle/ttl

TODO

Use at

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#>
SELECT ?item ?itemLabel (group_concat(distinct ?platform;separator=", ") as ?platforms) (group_concat(distinct ?genre;separator=", ") as ?genres) WHERE
{ 
   {
  SELECT ?item WHERE 
  {
    ?item wdt:P31 wd:Q7889 .
  } LIMIT 10 }  ?item wdt:P400 ?p1.
  ?item wdt:P136 ?g1.
  bind(strafter(str(?p1), "http://www.wikidata.org/entity/") as ?platform)
  bind(strafter(str(?g1), "http://www.wikidata.org/entity/") as ?genre)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} group by ?item ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?g1") v5("?genre"):::projected v7("?genres") v1("?item"):::projected v2("?p1") v4("?platform"):::projected v6("?platforms") c6(["bd:serviceParam"]):::iri c2(["wd:Q7889"]):::iri c8(["en"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P400"--> v2 v1 --"wdt:P136"--> v3 bind0[/"substring-after(str(?p1),'http://www.wikidata.org/entity/')"/] v2 --o bind0 bind0 --as--o v4 bind1[/"substring-after(str(?g1),'http://www.wikidata.org/entity/')"/] v3 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind4[/"?platform"/] v4 --o bind4 bind4 --as--o v6 bind5[/"?genre"/] v5 --o bind5 bind5 --as--o v7