0

I want to get 2019–20 COVID-19 pandemic (Q81068910) number of deaths (P1120)+ associated time for each country. I use the wikidata sparql as following, I cannot get the associated time of number of deaths (P1120). I try to add ?num wdt:P585 ?time in the following sparql, but I get an error. Thank you for your help.

SELECT ?pandemic ?pandemicLabel ?num ?time ?country ?countryLabel WHERE { ?pandemic wdt:P31 wd:Q3241045. ?pandemic wdt:P361 wd:Q81068910. ?pandemic wdt:P1120 ?num. #?num wdt:P585 ?time #error, mark it as comment ?pandemic wdt:P17 ?country. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

  • that's not how the Wikidata model works. I mean, ?num would be a number which can't be the subject of an RDF triple. Please read about "statement qualifiers" of the Wikidata model. – UninformedUser Apr 20 '20 at 05:59
  • That said: `SELECT ?pandemic ?pandemicLabel ?num ?time ?country ?countryLabel { ?pandemic wdt:P31 wd:Q3241045. ?pandemic wdt:P361 wd:Q81068910. ?pandemic p:P1120 [ ps:P1120 ?num ; pq:P585 ?time ] . ?pandemic wdt:P17 ?country. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }` – UninformedUser Apr 20 '20 at 05:59

0 Answers0