Ejemplos de código: curl
SELECT ?intervention ?interventionLabel (COUNT(?trial) AS ?trials) WHERE {
VALUES ?topic {
wd:Q84263196 wd:Q82069695
}
?trial wdt:P31 wd:Q30612 ;
wdt:P921 ?topic ;
wdt:P4844 ?intervention .
SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". }
} GROUP BY ?intervention ?interventionLabel
ORDER BY DESC(?trials) ASC(?intervention)
curl -s https://raw.githubusercontent.com/egonw/SARS-CoV-2-Queries/master/sparql/clinicalTrialsByIntervention.rq | sed 's+<lang/>+es+' > clinicalTrialsByIntervention.rq
curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@clinicalTrialsByIntervention.rq
Esta consulta SPARQL está disponible en CCZero.