query-3598742cbb956a5b1ea0cb761546de19

rq turtle/ttl

Second query, but still incorrect SELECT ?book ?title ?illustratorLabel ?publisherLabel ?published WHERE { ?book wdt:P50 wd:Q35610. # required wdt:P50 OPTIONAL { # match all or none from group: ?book wdt:P1476 ?title; # required wdt:P1476 wdt:P110 ?illustrator; # required wdt:P110 wdt:P123 ?publisher; # required wdt:P123 wdt:P577 ?published. # required wdt:P577 } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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#>
# Second query, but still incorrect
SELECT ?book ?title ?illustratorLabel ?publisherLabel ?published
WHERE
{
  ?book wdt:P50 wd:Q35610.       # required wdt:P50
  OPTIONAL {                     # match all or none from group:
    ?book wdt:P1476 ?title;         # required wdt:P1476
          wdt:P110 ?illustrator;    # required wdt:P110
          wdt:P123 ?publisher;      # required wdt:P123
          wdt:P577 ?published.      # required wdt:P577
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?book"):::projected v3("?illustrator") v5("?published"):::projected v4("?publisher") v2("?title"):::projected c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q35610"]):::iri v1 --"wdt:P50"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1476".-> v2 v1 --"wdt:P110"--> v3 v1 --"wdt:P123"--> v4 v1 --"wdt:P577"--> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end