query-7104cf780904ef9239813d5450e6198f

rq turtle/ttl

title:Things depicted in multiple Khalili Collections SELECT ?depicted ?depictedLabel (COUNT(DISTINCT ?coll) AS ?collections) (COUNT(?work) AS ?works) WHERE { ?work wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499. # Work in Khalili Collections ?work wdt:P180 ?depicted.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } GROUP BY ?depicted ?depictedLabel HAVING(?collections > 1) ORDER BY DESC(?collections) DESC(?works)

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#>
#title:Things depicted in multiple Khalili Collections
SELECT ?depicted ?depictedLabel (COUNT(DISTINCT ?coll) AS ?collections) (COUNT(?work) AS ?works)  WHERE {
  ?work wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499. # Work in Khalili Collections
                             ?work wdt:P180 ?depicted.  
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?depicted ?depictedLabel HAVING(?collections > 1)
ORDER BY DESC(?collections) DESC(?works)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?coll"):::projected v6("?collections") v5("?depicted"):::projected v3("?work"):::projected v6("?works") c7(["bd:serviceParam"]):::iri c4(["wd:Q63160499"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?collections > '1^^xsd:integer'"]] f0 --> v6 v3 --"wdt:P195"--> v4 v4 --"wdt:P361"--> c4 v3 --"wdt:P180"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind3[/"count(?coll)"/] v4 --o bind3 bind3 --as--o v6 bind4[/"count(?work)"/] v3 --o bind4 bind4 --as--o v6