query-0dec24fed352c482a1d0638096b11879

rq turtle/ttl

best-described items in Te Papa museum SELECT DISTINCT ?q ?stcount WHERE { { ?q wdt:P195 wd:Q915603 .} # in Te Papa's collection UNION { ?q wdt:P276 wd:Q915603 .} # or "located in" Te Papa } # ?q wdt:P31 wd:Q3305213 . # limit to paintings (to not timeout) ?q wikibase:statements ?stcount . } GROUP BY ?q ?stcount ORDER BY DESC(?stcount)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
# best-described items in Te Papa museum
SELECT DISTINCT ?q ?stcount WHERE {
  { ?q wdt:P195 wd:Q915603 .} # in Te Papa's collection 
  UNION 
  { ?q wdt:P276 wd:Q915603 .} # or "located in" Te Papa }
  # ?q wdt:P31 wd:Q3305213 . # limit to paintings (to not timeout)
  ?q wikibase:statements ?stcount .
} GROUP BY ?q ?stcount
ORDER BY DESC(?stcount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?q"):::projected v1("?stcount"):::projected c2(["wd:Q915603"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P276"--> c2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P195"--> c2 end union0r <== or ==> union0l end v2 --"wikibase:statements"--> v1