query-a5ed03155438eba8f725b32c7c5d417d
...all properties that are used by the instances of a specific class! ...all properties used by name reactions!
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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?prop ?propLabel (COUNT(?prop) AS ?number)
WHERE {
# recommended to display the property's label
?prop wikibase:directClaim ?p . # needed to display the property's label
?instance wdt:P31 wd:Q1049494 .
?instance ?p ?o .
SERVICE wikibase:label {bd:serviceParam wikibase:language "en,de"}
} GROUP BY ?prop ?propLabel
ORDER BY DESC(?number)
Query found at
- https://www.wikidata.org/wiki/User:Wiljes/basics
- https://www.wikidata.org/wiki/User:Wiljes/chemistry
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?instance")
v6("?number")
v5("?o")
v3("?p")
v2("?prop"):::projected
c5(["bd:serviceParam"]):::iri
c7(["en,de"]):::literal
c3(["wd:Q1049494"]):::iri
v2 --"wikibase:directClaim"--> v3
v4 --"wdt:P31"--> c3
v4 -->v3--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind1[/"count(?prop)"/]
v2 --o bind1
bind1 --as--o v6