query-7bd957df5e07e172005760725469ae69
Most used qualifiers for most used properties of Odisha Sahitya Akademi award winners SELECT ?prop ?propLabel ?count ?qualifiers WHERE { { SELECT ?p (COUNT(DISTINCT ?item) AS ?count) (GROUP_CONCAT(DISTINCT ?q; separator=', ') AS ?qualifiers) WHERE { ?item wdt:P166 wd:Q6596243. ?item ?p [] . ?p ^wikibase:claim [] . OPTIONAL { { SELECT ?p (CONCAT(STRAFTER(STR(?qualifier), STR(pq:)), ': ', STR(COUNT(DISTINCT ?statement))) AS ?q) WHERE { [] wdt:P166 wd:Q6596243; ?p ?statement . ?p ^wikibase:claim [] . ?statement ?qualifier [] . ?qualifier ^wikibase:qualifier [] . } GROUP BY ?p ?qualifier } . } . } GROUP BY ?p } . ?prop wikibase:claim ?p . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } . } ORDER BY DESC(?count)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Most used qualifiers for most used properties of Odisha Sahitya Akademi award winners
SELECT ?prop ?propLabel ?count ?qualifiers WHERE {
{
SELECT ?p (COUNT(DISTINCT ?item) AS ?count) (GROUP_CONCAT(DISTINCT ?q; separator=', ') AS ?qualifiers) WHERE {
?item wdt:P166 wd:Q6596243.
?item ?p [] .
?p ^wikibase:claim [] .
OPTIONAL {
{
SELECT ?p (CONCAT(STRAFTER(STR(?qualifier), STR(pq:)), ': ', STR(COUNT(DISTINCT ?statement))) AS ?q) WHERE {
[] wdt:P166 wd:Q6596243;
?p ?statement .
?p ^wikibase:claim [] .
?statement ?qualifier [] .
?qualifier ^wikibase:qualifier [] .
} GROUP BY ?p ?qualifier
} .
} .
} GROUP BY ?p
} .
?prop wikibase:claim ?p .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
} ORDER BY DESC(?count)