query-cd0abe83007b3ca59ed2ed945b8ae1c0

rq turtle/ttl

Quick query for items with most values of the property P486 after User:Infovarius, 2019-07-15 SELECT ?item ?itemLabel ?cnt { { SELECT ?item (COUNT(?value) AS ?cnt) { ?item wdt:P486 ?value FILTER(STRSTARTS(?value, 'D')) } GROUP BY ?item ORDER BY DESC(?cnt) LIMIT 100 } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?cnt)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Quick query for items with most values of the property P486 after User:Infovarius, 2019-07-15
SELECT ?item ?itemLabel ?cnt
{
  {
       SELECT ?item (COUNT(?value) AS ?cnt)
       {
          ?item wdt:P486 ?value
          FILTER(STRSTARTS(?value, 'D'))
       }
       GROUP BY ?item ORDER BY DESC(?cnt) LIMIT 100
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?cnt)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?cnt"):::projected v3("?item"):::projected v2("?value") c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["starts-with(?value,'D')"]] f0 --> v2 v3 --"wdt:P486"--> v2 bind2[/"count(?value)"/] v2 --o bind2 bind2 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end