query-498a6a249abdfcfa40fcb8cf3df3d845

rq turtle/ttl

Simpler version of the above; but not always as complete

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?shelfmark ?groupLabel ?commonsCat  WHERE {
  ?item wdt:P3702 ?group .
  OPTIONAL {?item wdt:P217 ?shelfmark}  .  # Shelfmark
  OPTIONAL {?item wdt:P373 ?commonsCat}
  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; v4("?commonsCat"):::projected v2("?group") v1("?item"):::projected v3("?shelfmark"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P3702"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P217".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P373".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end