query-508dde5c261faeea9ac4b6bbd7f77489
(Q11173)chemical compound
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 ?class ?classLabel ?classNumber WHERE {
SELECT ?class ?classLabel (COUNT(?class) AS ?classNumber) WHERE {
?item wdt:P31 wd:Q11173, ?class filter (?class != wd:Q11173) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "pl,en". }
}
GROUP BY ?class ?classLabel
}
ORDER BY DESC(?classNumber) ?classLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?class"):::projected
v2("?classLabel"):::projected
v5("?classNumber"):::projected
v4("?item")
c4(["bd:serviceParam"]):::iri
c1(["wd:Q11173"]):::iri
c6(["pl,en"]):::literal
f0[["?class != 'wd:Q11173'"]]
f0 --> v3
v4 --"wdt:P31"--> c1
v4 --"wdt:P31"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind2[/"count(?class)"/]
v3 --o bind2
bind2 --as--o v5