query-4bc8d5afb6f31d59e51c77a05dd8ffb8

rq turtle/ttl

in each property (P2302)property constraint The following query gets the maximum number of values for a qualifier used in values of

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
  ?property
  ?propertyLabel
  ?node
  ?max
{
   {
  SELECT
    ?property
    ?node
    (MAX(?count) AS ?max)
  {
     {
  SELECT ?property ?node (COUNT(*) AS ?count) {
    INCLUDE %1.
  }
  GROUP BY ?property ?node
}
  }
  GROUP BY ?property ?node
}
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE]"}.
}
ORDER BY DESC(?max)

Query found at