Ejemplos de código: curl
SELECT ?virus ?virusLabel ?count WITH {
SELECT ?virus (COUNT(DISTINCT ?work) AS ?count) WHERE {
VALUES ?virus {
wd:Q82069695 # SARS-CoV-2
wd:Q16983360 # HKU1
wd:Q16991954 # OC43
wd:Q8351095 # NL63
wd:Q16983356 # 229E
wd:Q4902157 # MERS-CoV
wd:Q278567 # SARS-CoV
}
?work wdt:P921 ?virus .
} GROUP BY ?virus
} AS %ARTICLES WHERE {
INCLUDE %ARTICLES
SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". }
}
ORDER BY DESC(?count)
virus | count |
SARS-CoV-2 (edit) | 24131 |
SARS coronavirus (edit) | 2487 |
MERS-CoV (edit) | 1051 |
Human coronavirus OC43 (edit) | 114 |
Human coronavirus 229E (edit) | 107 |
Coronavirus Humana NL63 (edit) | 94 |
Human coronavirus HKU1 (edit) | 22 |
curl -s https://raw.githubusercontent.com/egonw/SARS-CoV-2-Queries/master/sparql/litHumanCoronavirusesCounts.rq | sed 's+<lang/>+es+' > litHumanCoronavirusesCounts.rq
curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@litHumanCoronavirusesCounts.rq
Esta consulta SPARQL está disponible en CCZero.