query-18d09869f2b65009932abdb74e2cc52b

rq turtle/ttl

Most popular qualifiers for most popular properties. Or at least row for each property+qualifier pair. Query (probably may be done in a better way): P: , P: etc. items. Could somebody add column, which lists, what qualifiers (and their count) are used for that particular property? Something like this: (Q276)Eurovision Song Contest I have a query, which lists used properties by their popularity at

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#>
SELECT ?prop ?propLabel ?count WHERE {
    {
        SELECT ?prop (COUNT(DISTINCT ?item) AS ?count) WHERE {


           ?item wdt:P31 wd:Q276 .
           ?item ?p ?id .
           ?prop wikibase:directClaim ?p .
        }  GROUP BY ?prop
    }

    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
    }
} ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count"):::projected v4("?id") v2("?item") v3("?p") v5("?prop"):::projected c5(["bd:serviceParam"]):::iri c7(["en"]):::literal c2(["wd:Q276"]):::iri v2 --"wdt:P31"--> c2 v2 -->v3--> v4 v5 --"wikibase:directClaim"--> v3 bind1[/"count(?item)"/] v2 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end