query-03160889fa9fd29808abfbd2a045d80d

rq turtle/ttl

2.I have reworked it in this way:

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 ?AutorLabel ?Titel ?Untertitel ?veroeffentlicht_in ?VerlagLabel ?ErscheinungsortLabel (year(?Erscheinungsdatum) as ?Erscheinungsjahr) WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  {
    ?werk wdt:P655 wd:Q92759384.
    ?werk (wdt:P361?) / (wdt:P361| wdt:P1433) ?published_in.
    ?published_in wdt:P1476 ?veroeffentlicht_in.  
    ?published_in wdt:P123 ?Verlag.
    ?published_in wdt:P291 ?ErscheinungsortLabel.
    ?published_in wdt:P577 ?Erscheinungsdatum.}
  OPTIONAL { ?werk wdt:P50 ?Autor. }
  OPTIONAL { ?werk wdt:P2093 ?Autor. }
  OPTIONAL { ?werk wdt:P1476 ?Titel. }
  OPTIONAL { ?werk wdt:P1680 ?Untertitel. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?Autor") v6("?Erscheinungsdatum"):::projected v10("?Erscheinungsjahr") v5("?ErscheinungsortLabel"):::projected v8("?Titel"):::projected v9("?Untertitel"):::projected v4("?Verlag") v2("?published_in") v3("?veroeffentlicht_in"):::projected v1("?werk") a1((" ")) c6(["wd:Q92759384"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P655"--> c6 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P1433"--> v2 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P361"--> v2 end union1r <== or ==> union1l end v2 --"wdt:P1476"--> v3 v2 --"wdt:P123"--> v4 v2 --"wdt:P291"--> v5 v2 --"wdt:P577"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P50".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2093".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1476".-> v8 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1680".-> v9 end bind0[/"year-from-dateTime(?Erscheinungsdatum)"/] v6 --o bind0 bind0 --as--o v10