query-b07cfd99d06a7f3d5e7627f44ab0fb21
Descriptors
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?items
?descriptor ?descriptorLabel
(CONCAT("#descriptor/", SUBSTR(STR(?descriptor), 32)) AS ?descriptorUrl)
?descriptorDescription
?example_item ?example_itemLabel
WHERE {
{
SELECT
(COUNT(?item) AS ?items)
?descriptor
(SAMPLE(?item) AS ?example_item)
WHERE {
?item wdt:P1343 ?descriptor .
}
GROUP BY ?descriptor
ORDER BY DESC(?items)
LIMIT 2000
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?items)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?descriptor"):::projected
v5("?descriptorUrl")
v4("?example_item"):::projected
v2("?item")
v4("?items"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P1343"--> v3
bind2[/"count(?item)"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"sample(?item)"/]
v2 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
bind4[/"concat('#descriptor/',substring(str(?descriptor),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5