query-2cb71adc179359ad2a311b483a8a7be4
, que está usada para un puñado de 38 elementos, que se corresponden con 174 artículos en Wikipedia. Obra literaria perdidaPero no todas las subclases suponen lo mismo. Veams por ejemplo la subclase
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT (count(?item) as ?n_items) (sum(?n_arts) as ?total)
WHERE
{
SELECT ?item (count(?article) as ?n_arts) WHERE {
?item wdt:P31 wd:Q1585442 .
?article schema:about ?item .
FILTER (CONTAINS(str(?article),'wikipedia'))
}
GROUP BY ?item
ORDER BY DESC(?n_arts)
}
Query found at
- https://www.wikidata.org/wiki/User:Tsaorin/Obrasliterarias
- https://www.wikidata.org/wiki/User:Tsaorin/Subclases
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v3("?item"):::projected
v4("?n_arts"):::projected
v4("?n_items")
v5("?total")
c3(["wd:Q1585442"]):::iri
f0[["contains(str(?article),'wikipedia')"]]
f0 --> v2
v3 --"wdt:P31"--> c3
v2 --"schema:about"--> v3
bind2[/"count(?article)"/]
v2 --o bind2
bind2 --as--o v4
bind5[/"count(?item)"/]
v3 --o bind5
bind5 --as--o v4
bind6[/"sum(?n_arts)"/]
v4 --o bind6
bind6 --as--o v5