query-6cac6c0626b5af0b1bb284a8c6394c20

rq turtle/ttl

Ware image grid (w/ links to PM20 folders)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid{"hide":["?img"]}
select ?ware ?wareLabel (max(?image) as ?img) (concat('in ', str(count(?country)), ' Ländern') as ?countries) ?pm20link
where {
  {
  select ?ware ?image ?wareId
  where {
    ?ware wdt:P10890 ?wareId ;
          wdt:P18 ?image .
   }
  }
  ?folder wdt:P921 ?ware ;
          wdt:P1269 ?country .

   bind(uri(concat('https://pm20.zbw.eu/category/ware/i/', ?wareId)) as ?pm20link)

   SERVICE wikibase:label { bd:serviceParam wikibase:language "de" . }
}
group by ?ware ?wareLabel ?pm20link
order by ?wareLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?countries") v6("?country") v5("?folder") v4("?image"):::projected v8("?img") v7("?pm20link"):::projected v2("?ware"):::projected v3("?wareId") v1("?wareLabel"):::projected c8(["de"]):::literal c6(["bd:serviceParam"]):::iri v2 --"wdt:P10890"--> v3 v2 --"wdt:P18"--> v4 v5 --"wdt:P921"--> v2 v5 --"wdt:P1269"--> v6 bind0[/"concat('https://pm20.zbw.eu/category/ware/i/',?wareId)"/] v3 --o bind0 bind0 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind3[/"max(?image)"/] v4 --o bind3 bind3 --as--o v8 bind4[/"concat('in ',str(),' Ländern')"/] null --o bind4 bind4 --as--o v9