SARS-CoV-2-Queries

vaccines.rq

Code examples: curl

SPARQL

SELECT DISTINCT ?vaccine ?vaccineLabel ?type ?typeLabel WHERE {
  VALUES ?for { wd:Q84263196 }
  ?vaccine wdt:P31 / wdt:P279? wd:Q134808 ;
           wdt:P1924 ?for .
  ?vaccine wdt:P31 ?type .
  FILTER ( ?type != wd:Q28051899 ) FILTER ( ?type != wd:Q98734151 )
  FILTER ( ?type != wd:Q87719492 ) FILTER ( ?type != wd:Q30612 )
  FILTER ( ?type != wd:Q134808 )
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} ORDER BY ASC(?vaccine) ASC(?type)

run or edit

Output

vaccine type
Gam-COVID-Vac (edit) vaccine type (edit)

Code examples

curl

curl -s https://raw.githubusercontent.com/egonw/SARS-CoV-2-Queries/master/sparql/vaccines.rq | sed 's+<lang/>+en+' > vaccines.rq

curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@vaccines.rq

This SPARQL query is available under CCZero.