query-dbe17ac9b0426ed39e543d8095ec26a8

rq turtle/ttl

Propertiesinstance of (P31)PM20 folder ID (P4293)facet of (P1269)main subject (P921)PM20 geo code (P8483)PM20 subject code (P8484)

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 distinct ?item ?subjectCode ?itemLabel ?pm20Folder
where {
  ?item wdt:P31 wd:Q91257459 ;
        wdt:P4293 ?folderId ;
        wdt:P1269 ?country ;
        wdt:P921 ?subjectCategory .
  ?country wdt:P8483 ?geoCode .
  ?subjectCategory wdt:P8484 ?subjectCode .

  # construct URI for folder access
  bind(uri(concat('http://purl.org/pressemappe20/folder/', ?folderId)) as ?pm20Folder)

  # TODO create sort order by serial ordinal

  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
order by ?geoCode ?subjectCode

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?country") v4("?folderId") v1("?geoCode") v3("?item"):::projected v7("?pm20Folder"):::projected v6("?subjectCategory") v2("?subjectCode"):::projected c11(["de"]):::literal c9(["bd:serviceParam"]):::iri c2(["wd:Q91257459"]):::iri v3 --"wdt:P31"--> c2 v3 --"wdt:P4293"--> v4 v3 --"wdt:P1269"--> v5 v3 --"wdt:P921"--> v6 v5 --"wdt:P8483"--> v1 v6 --"wdt:P8484"--> v2 bind0[/"concat('http://purl.org/pressemappe20/folder/',?folderId)"/] v4 --o bind0 bind0 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end