query-48e6d59270f167982c8990fbb3e6b60d
...all properties that are used by chemical elements or chemical compounds! TIMEOUT
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:Q11344} UNION {?instance wdt:P31 wd:Q11173}
?instance ?p ?o .
SERVICE wikibase:label {bd:serviceParam wikibase:language "en,de"}
} GROUP BY ?prop ?propLabel
ORDER BY DESC(?number)
Query found at
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
c6(["bd:serviceParam"]):::iri
c4(["wd:Q11173"]):::iri
c8(["en,de"]):::literal
c3(["wd:Q11344"]):::iri
v2 --"wikibase:directClaim"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P31"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P31"--> c3
end
union0r <== or ==> union0l
end
v4 -->v3--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"count(?prop)"/]
v2 --o bind1
bind1 --as--o v6