query-d32b69e2d0c7091a1a771b84622bb98f
Count all property Has Quality is used in all Literary Works
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?hasquality ?hasqualityLabel
(COUNT(DISTINCT ?item) AS ?counting)
WHERE {
?item p:P31/ps:P31/wdt:P279* wd:Q7725634 . # instance of this class or of any of its sub-classes, sub-sub-classes...
?item wdt:P1552 ?hasquality .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?hasquality ?hasqualityLabel
ORDER BY DESC(?counting)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?counting")
v3("?hasquality"):::projected
v2("?item"):::projected
a1((" "))
a2((" "))
c7(["bd:serviceParam"]):::iri
c4(["wd:Q7725634"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:P31"--> a1
a1 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> c4
v2 --"p:direct/P1552"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v4