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