query-39cdc3a0bab2e76234f1701958751a11

rq turtle/ttl

title: Things connected to art works of the Khalili Collections SELECT DISTINCT (?nameplusdesc AS ?label) (GROUP_CONCAT(STR(?link)) AS ?links) WHERE { VALUES ?prop {wdt:P180 wdt:P50 wdt:P88 wdt:P1774 wdt:P31} # depicted creator commissioned_by workshop_of instance_of ?work wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499. ?work wdt:P973 ?link; ?prop ?depicted. FILTER (CONTAINS(STR(?link), "khalilicollections"))
FILTER (?depicted NOT IN (wd:Q79496108, wd:Q153988, wd:Q22669850, wd:Q87167, wd:Q48498, wd:Q49848, wd:Q639460, wd:Q987767, wd:Q1922981, wd:Q2142903, wd:Q18593264, wd:Q29382731, wd:Q368972, wd:Q3305213, wd:Q17379525, wd:Q22075301, wd:Q191851))

enamel bowl calligraphic_work manuscript illuminated_manuscript document casket container glassware

jewellery item_of_collection metal_artwork lacquerware painting pottery_ware textile_artwork vase

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?depicted rdfs:label ?name. ?depicted schema:description ?desc} BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc) } GROUP BY ?nameplusdesc ORDER BY UCASE(?label)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Things connected to art works of the Khalili Collections
SELECT DISTINCT (?nameplusdesc AS ?label) (GROUP_CONCAT(STR(?link)) AS ?links) WHERE {
  VALUES ?prop {wdt:P180 wdt:P50 wdt:P88 wdt:P1774 wdt:P31}
  # depicted creator commissioned_by workshop_of instance_of
  ?work wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499. ?work wdt:P973 ?link; ?prop ?depicted.
  FILTER (CONTAINS(STR(?link), "khalilicollections"))  
 FILTER (?depicted NOT IN (wd:Q79496108, wd:Q153988, wd:Q22669850, wd:Q87167, wd:Q48498,
                          wd:Q49848, wd:Q639460, wd:Q987767, wd:Q1922981, wd:Q2142903,
                          wd:Q18593264, wd:Q29382731, wd:Q368972, wd:Q3305213,
                          wd:Q17379525, wd:Q22075301, wd:Q191851))
# enamel bowl calligraphic_work manuscript illuminated_manuscript document casket container glassware
# jewellery item_of_collection metal_artwork lacquerware painting pottery_ware textile_artwork vase
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
                            ?depicted rdfs:label ?name. ?depicted schema:description ?desc}
  BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc)
} GROUP BY ?nameplusdesc 
ORDER BY UCASE(?label)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coll") v2("?depicted") v8("?desc") v10("?label") v3("?link"):::projected v10("?links") v7("?name") v9("?nameplusdesc"):::projected v4("?prop") v5("?work") c24(["bd:serviceParam"]):::iri c21(["wd:Q63160499"]):::iri c26(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?depicted != 'wd:Q79496108'?depicted != 'wd:Q153988'?depicted != 'wd:Q22669850'?depicted != 'wd:Q87167'?depicted != 'wd:Q48498'?depicted != 'wd:Q49848'?depicted != 'wd:Q639460'?depicted != 'wd:Q987767'?depicted != 'wd:Q1922981'?depicted != 'wd:Q2142903'?depicted != 'wd:Q18593264'?depicted != 'wd:Q29382731'?depicted != 'wd:Q368972'?depicted != 'wd:Q3305213'?depicted != 'wd:Q17379525'?depicted != 'wd:Q22075301'?depicted != 'wd:Q191851'"]] f0 --> v2 f1[["contains(str(?link),'khalilicollections')"]] f1 --> v3 bind2[/VALUES ?prop/] bind2-->v4 bind20(["wdt:P180"]) bind20 --> bind2 bind21(["wdt:P50"]) bind21 --> bind2 bind22(["wdt:P88"]) bind22 --> bind2 bind23(["wdt:P1774"]) bind23 --> bind2 bind24(["wdt:P31"]) bind24 --> bind2 v5 --"wdt:P195"--> v6 v6 --"wdt:P361"--> c21 v5 --"wdt:P973"--> v3 v5 -->v4--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c24 --"wikibase:language"--> c26 v2 --"rdfs:label"--> v7 v2 --"schema:description"--> v8 end bind3[/"if(bound(?desc),concat(?name,', ',?desc),?name)"/] v8 --o bind3 v7 --o bind3 bind3 --as--o v9 bind5[/"?nameplusdesc"/] v9 --o bind5 bind5 --as--o v10 bind6[/"str(?link)"/] v3 --o bind6 bind6 --as--o v10