Code examples: curl
#defaultView:Graph
SELECT ?parent ?parentLabel ?virus ?virusLabel ?ncbi WHERE {
?virus wdt:P171+ wd:Q16532287 .
?virus wdt:P171 ?parent .
OPTIONAL { ?virus wdt:P685 ?ncbi }
SERVICE wikibase:label { bd:serviceParam wikibase:language "pt,en". }
}
curl -s https://raw.githubusercontent.com/egonw/SARS-CoV-2-Queries/master/sparql/allBetacoronaVirusesGraph.rq | sed 's+<lang/>+pt+' > allBetacoronaVirusesGraph.rq
curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@allBetacoronaVirusesGraph.rq
This SPARQL query is available under CCZero.