query-9d26de11e2c35b6ed282bf26ae22f5ef
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?q ?qLabel ?items {
{
SELECT ?q (COUNT(DISTINCT(?item)) AS ?items) {
?item p:P528 ?s .
?s ps:P528 ?z .
?s pq:P972 ?q .
}
group by ?q}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY DESC(?items)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item")
v6("?items"):::projected
v5("?q"):::projected
v3("?s")
v4("?z")
c5(["bd:serviceParam"]):::iri
c7(["en"]):::literal
v2 --"p:P528"--> v3
v3 --"p:statement/P528"--> v4
v3 --"p:qualifier/P972"--> v5
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