Wikidata:WikiProject COVID-19/Queries

Home

 

Items

 

Data models

 

Queries

 

Focus list

 

Statistics relating to pandemic spread edit

Number of WHO confirmed cases and deaths globally by date edit

The following query uses these:

  • Properties: author (P50)     , number of cases (P1603)     , number of deaths (P1120)     , stated in (P248)     , point in time (P585)     
    #defaultView:LineChart
    SELECT ?date (MAX(?count) AS ?max_count) ?measureLabel
    WHERE {
      BIND(wd:Q81068910 AS ?outbreak).
      {
        BIND(wd:Q166231 AS ?measure).
        ?outbreak p:P1603 ?cases.
        ?cases prov:wasDerivedFrom/pr:P248/wdt:P50 wd:Q7817.
        ?cases pqv:P585/wikibase:timeValue ?date.
        ?cases psv:P1603/wikibase:quantityAmount ?count.
        ?cases psv:P1603/wikibase:quantityAmount ?infection_count.
      } UNION {
        BIND(wd:Q4 AS ?measure).
        ?outbreak p:P1120 ?deaths.
        ?deaths prov:wasDerivedFrom/pr:P248/wdt:P50 wd:Q7817.
        ?deaths pqv:P585/wikibase:timeValue ?date.
        ?deaths psv:P1120/wikibase:quantityAmount ?count.
        ?deaths psv:P1120/wikibase:quantityAmount ?death_count.
      }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    GROUP BY ?date ?measureLabel
    ORDER BY ASC(?date) DESC(?measure)
    

Dashboard of cases per country edit

The following query uses these:

(From Wikidata:WikiProject_Humanitarian_Wikidata#COVID-19_outbreak_dashboard)

Effect on individuals edit

Image grid of individuals who have died from COVID-19 ordered by Wikidata item completeness edit

The following query uses these:

Features: ImageGrid (Q24515278)     

#defaultView:ImageGrid
SELECT ?person ?date_of_death ?age ?image
WHERE {
    ?person wdt:P509 wd:Q84263196 ; wdt:P31 wd:Q5 
    OPTIONAL { ?person wdt:P570 ?date_of_death }
    OPTIONAL { ?person wikibase:statements ?statements_count ; wikibase:sitelinks ?sitelinks_count ; wikibase:identifiers ?identifiers_count . BIND(?statements_count + ?sitelinks_count + ?identifiers_count AS ?rank)}
    OPTIONAL { ?person wdt:P569 ?dob ; wdt:P570 ?dod . BIND(YEAR(?dod)-YEAR(?dob) as ?age) }
    OPTIONAL { ?person wdt:P18 ?image }
}
ORDER BY DESC(?rank)

Notes:

  • Only individuals with an image in Wikidata are shown in the image grid. Switch to tabular view to see a more complete list of individuals.
  • Wikidata item completeness is based on the number of sitelinks, statements and identifiers for each Wikidata item for an individual.

Image grid of individuals who have been diagnosed with COVID-19 ordered by Wikidata item completeness edit

The following query uses these:

Features: ImageGrid (Q24515278)     

#defaultView:ImageGrid
SELECT ?person ?person_label (GROUP_CONCAT(?country_of_citizenship_label; separator=";") AS ?countries_of_citizenship) ?image ?rank
WHERE {
    ?person wdt:P1050 wd:Q84263196; wdt:P31 wd:Q5 .
    OPTIONAL { ?person rdfs:label ?person_label . FILTER(LANG(?person_label) = "en")}
    OPTIONAL { ?person wikibase:statements ?statements_count ; wikibase:sitelinks ?sitelinks_count ; wikibase:identifiers ?identifiers_count . BIND(?statements_count + ?sitelinks_count + ?identifiers_count AS ?rank)}
    OPTIONAL { ?person wdt:P18 ?image }
    OPTIONAL { ?person wdt:P27 ?country_of_citizenship . ?country_of_citizenship rdfs:label ?country_of_citizenship_label . FILTER(LANG(?country_of_citizenship_label) = "en")}
}
GROUP BY ?person ?person_label ?image ?rank
ORDER BY DESC(?rank)

Notes:

  • Only individuals with an image in Wikidata are shown in the image grid. Switch to tabular view to see a more complete list of individuals.
  • Wikidata item completeness is based on the number of sitelinks, statements and identifiers for each Wikidata item for an individual.
  • Query could be improved by using Wikidata label service (automatic language choice) and hiding the ?rank output (but still using it for ORDER BY).

List of people who have died edit

See Wikidata:Lists/corona_virus_deaths

Map by place of death edit

#defaultView:Map{"hide":["?coor"]}
SELECT ?item ?itemLabel ?itemDescription ?img ?pod ?podLabel ?coor ?age
WHERE
{
    ?item wdt:P509 wd:Q84263196 ; wdt:P31 wd:Q5 .
    ?item wdt:P20 ?pod . ?pod wdt:P625 ?coor .
    OPTIONAL { ?item wdt:P18 ?img }
    OPTIONAL { ?item wdt:P569 ?dob ; wdt:P570 ?dod . BIND(YEAR(?dod)-YEAR(?dob) as ?age) }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Duration between first case and first death based on number of cases and number of deaths edit

#For this to work, ideally ?cases and ?deaths would have a value of 1
#"significant event" (P793) could store the actual dates
#
SELECT ?item ?itemLabel 
  ?firstdeath ?deaths
  ?firstcase ?cases 
  (?firstdeath - ?firstcase as ?diff) 
WHERE
{
	# VALUES ?item { wd:Q83872271 }
    ?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361 wd:Q81068910 .   
    ?item p:P1120 [pq:P585 ?firstdeath ; ps:P1120 ?deaths ] .
    FILTER ( ?deaths > 0 )
    FILTER NOT EXISTS
    {
      ?item p:P1120 [pq:P585 ?date_deaths2 ; ps:P1120 ?deaths2 ].
      FILTER( ?firstdeath > ?date_deaths2 )
    }
    ?item p:P1603 [pq:P585 ?firstcase ; ps:P1603 ?cases ] .
    FILTER ( ?cases > 0 )  
    FILTER NOT EXISTS
    { 
        ?item p:P1603 [pq:P585 ?date_cases2 ; ps:P1603 ?cases2 ] 
        FILTER ( ?firstcase > ?date_cases2 )  
	}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Try it!

Media items in Wikidata edit

Scientific journal articles edit

with COVIDWHO ID (P8150) edit

The following query uses these:

  • Properties: COVIDWHO ID (P8150)     , publication date (P577)     
    SELECT DISTINCT ?item ?itemLabel ?pdate
    {
      ?item wdt:P8150 ?covidwho .
      OPTIONAL { ?item wdt:P577 ?pdate }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
    }
    

with main subject (P921) Sars-Cov-2, COVID-19, or the epidemic edit

The following query uses these:

  • Properties: instance of (P31)     , main subject (P921)     , publication date (P577)     
    SELECT DISTINCT ?item ?itemLabel ?pdate
    {
      VALUES ?topics { wd:Q82069695 wd:Q84263196 wd:Q81068910 } 
      ?item wdt:P31 wd:Q13442814.
      ?item wdt:P921 ?topics.
      OPTIONAL { ?item wdt:P577 ?pdate }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
    }
    

with main subject molecular/structural biology of any SARS-related strain edit

The following query uses these:

Biology of the SARS-CoV-2 edit

The following query uses these:

  • Properties: parent taxon (P171)     
    SELECT ?item ?itemLabel ?description WHERE 
    {  ?item wdt:P171* wd:Q16532287.
      BIND(SUBSTR( ?descriptionLong, 1, 80) AS ?description).
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
        ?item rdfs:label ?itemLabel.
        ?item schema:description ?descriptionLong.
      }
    }
    

Control methods edit

Curfews and restrictions on movement and activity edit

The following query uses these:

Proximity contact tracing protocols edit

The following query uses these:

  • Properties: instance of (P31)     , described by source (P1343)     , developer (P178)     
    SELECT ?proximity_contact_tracing_protocol ?proximity_contact_tracing_protocolLabel ?described_by_source ?described_by_sourceLabel ?developer ?developerLabel WHERE {
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
      ?proximity_contact_tracing_protocol wdt:P31 wd:Q93251355.
      OPTIONAL { ?proximity_contact_tracing_protocol wdt:P1343 ?described_by_source. }
      OPTIONAL { ?proximity_contact_tracing_protocol wdt:P178 ?developer. }
    }
    

Vaccines (and candidates) edit

List of vaccine candiates with trial phases edit

The following query uses these:

  • Properties: instance of (P31)     , vaccine for (P1924)     , described by source (P1343)     , clinical trial phase (P6099)     
    SELECT DISTINCT ?item (SAMPLE(?itemLabel) AS ?itemLabel) (SAMPLE(?trialLabels) AS ?trialLabels) (SAMPLE(?typeLabel) AS ?typeLabel)
    WHERE 
    {
      { ?item wdt:P31 wd:Q87719492 } UNION {
        VALUES ?v { wd:Q84263196 wd:Q82069695 }
        VALUES ?vv { wd:Q134808 wd:Q28051899 }
        ?item wdt:P31 ?vv.
        ?item wdt:P1924 ?v.
      }
      OPTIONAL
      {
        VALUES ?type { wd:Q3560939 wd:Q96695067 wd:Q96841548 wd:Q578537 wd:Q97153934 wd:Q97153933 wd:Q58623657 wd:Q99518999 }
        ?item wdt:P31 ?type
      }
      OPTIONAL { ?item wdt:P1343 ?type }
      { 	
        SELECT ?item (GROUP_CONCAT(DISTINCT(?trialLabel); separator=", ") AS ?trialLabels) 
      	WHERE
      	{ 
      	  ?item wdt:P1343 ?src.
          ?src wdt:P6099 ?trial.
          ?trial rdfs:label ?trialLabel. FILTER( LANG(?trialLabel)="en" )
    	}
        GROUP BY ?item
      }
      SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" . 
        ?item rdfs:label ?itemLabel .
        ?type rdfs:label ?typeLabel .
      	}
    }
    GROUP BY ?item
    

Map of organisations/companies developing/manufacturing a vaccine in trials edit

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?org ?orgLabel ?loc
WHERE 
{
  { ?item wdt:P31 wd:Q87719492 } UNION {
    VALUES ?v { wd:Q84263196 wd:Q82069695 }
    VALUES ?vv { wd:Q134808 wd:Q28051899 }
    ?item wdt:P31 ?vv.
    ?item wdt:P1924 ?v.
  }
  OPTIONAL
  {
    VALUES ?type { wd:Q3560939 wd:Q96695067 wd:Q96841548 wd:Q578537 wd:Q97153934 wd:Q97153933 wd:Q58623657 wd:Q99518999 }
    ?item wdt:P31 ?type
  }
  OPTIONAL {
    VALUES ?p { wdt:P176 wdt:P178 }
    ?item ?p ?org.
    OPTIONAL { ?org wdt:P159 [ wdt:P625 ?hloc ]. }
    OPTIONAL { ?org wdt:P625 ?cloc. }
    BIND (IF (BOUND(?hloc), ?hloc, ?cloc) AS ?loc)
    ?org rdfs:label ?orgLabel. FILTER( LANG(?orgLabel)="en" )
  }
  ?item rdfs:label ?itemLabel. FILTER( LANG(?itemLabel)="en" )
}

Test kits edit

The following query uses these:

  • Properties: instance of (P31)     , manufacturer (P176)     , uses (P2283)     
    SELECT DISTINCT ?item ?itemLabel ?manuLabel ?usesLabel
    {  
      ?item wdt:P31 wd:Q86901049.
      ?item wdt:P176 ?manu.
      OPTIONAL { 
        ?item wdt:P2283 ?uses.
      }
    
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
    }
    

Economic impacts edit

Bankrupted businesses edit

The following query uses these:

  • Properties: instance of (P31)     , subclass of (P279)     , country (P17)     , inception (P571)     , industry (P452)     , parent organization (P749)     , has subsidiary (P355)     , significant event (P793)     , point in time (P585)     , has cause (P828)     
    SELECT ?organization ?organizationLabel ?bankruptcyDate ?countryLabel ?inception (GROUP_CONCAT(DISTINCT ?industryLabel;separator=", ") AS ?industries) (GROUP_CONCAT(DISTINCT ?parentLabel;separator=", ") AS ?parents) (GROUP_CONCAT(DISTINCT ?subsiduaryLabel;separator=", ") AS ?subsiduaries) WHERE {
      ?organization wdt:P31/wdt:P279* wd:Q43229.
      OPTIONAL { ?organization wdt:P17 ?country }.
      OPTIONAL { ?organization wdt:P571 ?inception }.
      OPTIONAL { ?organization wdt:P452 ?industry }.
      OPTIONAL { ?organization wdt:P749 ?parent }.
      OPTIONAL { ?organization wdt:P355 ?subsiduary }.
      ?organization p:P793 ?event.
      ?event ps:P793 wd:Q152074.
      OPTIONAL { ?event pq:P585 ?bankruptcyDate }.
      ?event pq:P828 wd:Q96175652.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
                               ?organization rdfs:label ?organizationLabel.
                               ?country rdfs:label ?countryLabel.
                               ?industry rdfs:label ?industryLabel.
                               ?parent rdfs:label ?parentLabel.
                               ?subsiduary rdfs:label ?subsiduaryLabel }
    }
    GROUP BY ?organization ?organizationLabel ?bankruptcyDate ?countryLabel ?inception
    ORDER BY DESC(?bankruptcyDate)
    

Wikidata modelling metadata edit

Property usage edit

Property usage across items associated with SARS-CoV-2, COVID-19 or the COVID-19 pandemic edit

The following query uses these:

  • Items: SARS-CoV-2 (Q82069695)     , COVID-19 (Q84263196)     , COVID-19 pandemic (Q81068910)     
    SELECT DISTINCT ?property ?propertyLabel ?count
    WITH {
      SELECT DISTINCT ?item WHERE {
        VALUES ?topic { wd:Q82069695 wd:Q84263196 wd:Q81068910 }
        ?item ?claim ?topic . 
        ?property wikibase:directClaim ?claim.
      }
      LIMIT 200000
      } AS %items 
    WITH {
      SELECT DISTINCT ?property (COUNT(*) AS ?count) WHERE {
      INCLUDE %items.
        ?item ?p [ ] .
        ?property a wikibase:Property;
                    wikibase:claim ?p.
      }
      GROUP BY ?property 
      LIMIT 100
      } AS %results 
    WHERE {
      INCLUDE %results.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
    }
    ORDER BY DESC(?count)
    LIMIT 100
    

Properties used on COVID-19 items for outbreaks edit

The following query uses these:

  • Properties: Wikidata item of this property (P1629)     , instance of (P31)     , of (P642)     
    SELECT 
      (SAMPLE(?subjectitem) as ?item) 
      (concat("\u007B\u007BP\u007C",strafter(str(?property),"y/"),"\u007D\u007D") as ?p) 
        ?propertyLabel 	(COUNT(DISTINCT ?s) as ?ct) 
        ?total (100*?ct/?total AS ?percent)	(strafter(str(?ptype),"#") as ?ptype) 	(SAMPLE(?s) as ?sample) { 
        ?property wikibase:claim ?wdt .
        ?property wikibase:propertyType ?ptype . 
        OPTIONAL { ?property wdt:P1629 ?subjectitem } 
        ?s ?wdt ?value .
        ?s p:P31 ?statement. 
          ?statement ps:P31 wd:Q3241045. 
          ?statement pq:P642 wd:Q84263196. 
        FILTER (?s != wd:Q15397819 ) 
        SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } 
      { SELECT (COUNT(DISTINCT ?i) as ?total) { 
        ?i p:P31 ?statement. 
          ?statement ps:P31 wd:Q3241045. 
            ?statement pq:P642 wd:Q84263196. }
        } } 
    GROUP BY ?property ?propertyLabel ?total ?ptype 
    ORDER BY DESC(?ct) 
    LIMIT 200
    

Property usage per outbreak item edit

The following query uses these:

  • Properties: start time (P580)     , location (P276)     , country (P17)     , distribution map (P1846)     , subreddit (P3984)     , hashtag (P2572)     , instance of (P31)     , number of deaths (P1120)     , number of cases (P1603)     , of (P642)     
    SELECT DISTINCT ?item ?itemLabel ?beginning ?countryLabel ?locationLabel ?deaths ?cases  ?distribution_map 
    
    ( GROUP_CONCAT ( DISTINCT ?subreddit; separator="; " ) AS ?subreddits )
    ( GROUP_CONCAT ( DISTINCT ?hashtag; separator="; " ) AS ?hashtags )
    
    WHERE
    {
    	?item p:P31 ?statement. 
          ?statement ps:P31 wd:Q3241045. 
          ?statement pq:P642 wd:Q84263196. 
    	 
    	OPTIONAL{?item wdt:P580  ?beginning .}     
    	OPTIONAL{?item wdt:P276  ?location .}
        OPTIONAL{?item wdt:P17   ?country .} 
    
    # Using p instead of wdt to ignore ranking.
    
    	OPTIONAL{?item p:P1120 [ps:P1120 ?deaths] .} 
    	OPTIONAL{?item p:P1603 [ps:P1603 ?cases] .}
    	OPTIONAL{?item wdt:P1846 ?distribution_map .}
        OPTIONAL{?item wdt:P3984 ?subreddit .}    
        OPTIONAL{?item wdt:P2572 ?hashtag .} 
    
    # Get only the highest number for these status.
        FILTER NOT EXISTS {
        ?item p:P1120 [ps:P1120 ?deaths_] .
        FILTER (?deaths_ > ?deaths)
    }
            FILTER NOT EXISTS {
        ?item p:P1603 [ps:P1603 ?cases_] .
        FILTER (?cases_ > ?cases)
    }
      
    	SERVICE wikibase:label { #BabelRainbow
    		bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"
    	}
    }
    GROUP BY  ?item ?itemLabel ?beginning ?countryLabel ?locationLabel ?deaths ?cases  ?distribution_map 
    ORDER BY ?item
    

Outbreak items for countries and their respective countries edit

The following query uses these:

  • Properties: country (P17)     , instance of (P31)     , of (P642)     
    SELECT ?item ?itemLabel ?country ?countryLabel
    WHERE 
    {
      ?item p:P31 ?statement. 
          ?statement ps:P31 wd:Q3241045. 
          ?statement pq:P642 wd:Q84263196. 
      ?item wdt:P17 ?country.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

qid property ReplaceWithYourTargetID heuristic deduced

Maintenance queries edit

Missing properties edit

Missing properties on outbreak items edit

SELECT ?item ?itemLabel ?itemDescription
{
	?item p:P31 [ps:P31 wd:Q3241045 ; pq:P642 wd:Q84263196 ] . 
	MINUS { ?item wdt:P361 [] }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

SELECT ?item ?itemLabel ?itemDescription
{
	?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361+ wd:Q81068910 .   
	MINUS { ?item p:P276 [] }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

SELECT ?item ?itemLabel ?itemDescription
{
	?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361+ wd:Q81068910 .   
	MINUS { ?item p:P17 [] }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

SELECT ?item ?itemLabel ?itemDescription
{
	?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361+ wd:Q81068910 .   
	MINUS { ?item p:P580 [] }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

SELECT ?item ?itemLabel ?itemDescription
{
	?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361+ wd:Q81068910 .   
	MINUS { ?item p:P1120 [] }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Articles with a COVID-19 topic in the title but not as main subject edit

Notes of caution
  • To see whether anyone else is currently working on this, check recent QuickStatements batches or the relevant RecentChangesLinked pages (COVID-19 pandemic / COVID-19 / SARS-COV-2).
  • Before sending the query output to QuickStatements, please check whether everything is OK, then uncomment the ?item ?title line and rerun the query to get the results in QuickStatements format.
  • SPARQL query results may be affected by server lag.
  • When adapting these queries for any other topics, please pay attention not just to the search string but also to
    • the ReplaceWithYourTargetID and
    • -haswbstatement:P921= parts (which should both use the same identifier, e.g. Q82069695 for SARS-CoV-2) and of course to
    • strings and terms that can have different meanings in different circumstances.

COVID-19 pandemic edit

SELECT 
  DISTINCT 
  ?item ?title
  (REPLACE(STR(?item), ".*Q", "Q") AS ?qid) 
  ("P921" AS ?property)
  ("Q81068910" AS ?ReplaceWithYourTargetID)
  ("S887" AS ?heuristic)
  ("Q69652283" AS ?deduced)

WHERE {
  hint:Query hint:optimizer "None".
  
{  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "\"covid-19\" pandemic haswbstatement:P31=Q13442814 -haswbstatement:P921=Q81068910".
      ?page_title wikibase:apiOutput mwapi:title.
  }
 }
  BIND(IRI(CONCAT(STR(wd:), ?page_title)) AS ?item)
  
  ?item wdt:P1476 ?title.
  FILTER CONTAINS(LCASE(?title), "covid-19").
  FILTER CONTAINS(LCASE(?title), "pandemic").

}

Try it!

COVID-19 edit

SELECT 
  DISTINCT 
  ?item ?title
  (REPLACE(STR(?item), ".*Q", "Q") AS ?qid) 
  ("P921" AS ?property)
  ("Q84263196" AS ?ReplaceWithYourTargetID)
  ("S887" AS ?heuristic)
  ("Q69652283" AS ?deduced)

WHERE {
  hint:Query hint:optimizer "None".
  
{  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "\"covid-19\" haswbstatement:P31=Q13442814 -haswbstatement:P921=Q84263196".
      ?page_title wikibase:apiOutput mwapi:title.
  }
 }
  BIND(IRI(CONCAT(STR(wd:), ?page_title)) AS ?item)
  
  ?item wdt:P1476 ?title.
  FILTER CONTAINS(LCASE(?title), "covid-19"). # also check for variants, e.g. without the dash and/ or with "2019"

}

Try it!

SARS-COV-2 edit

SELECT 
  DISTINCT 
  ?item ?title
  (REPLACE(STR(?item), ".*Q", "Q") AS ?qid) 
  ("P921" AS ?property)
  ("Q82069695" AS ?ReplaceWithYourTargetID)
  ("S887" AS ?heuristic)
  ("Q69652283" AS ?deduced)

WHERE {
  hint:Query hint:optimizer "None".
  
{  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "\"sars-cov-2\" haswbstatement:P31=Q13442814 -haswbstatement:P921=Q82069695". # also check for spelling variants
      ?page_title wikibase:apiOutput mwapi:title.
  }
 }
  BIND(IRI(CONCAT(STR(wd:), ?page_title)) AS ?item)
  
  ?item wdt:P1476 ?title.
  FILTER CONTAINS(LCASE(?title), "sars-cov-2"). # also check for spelling variants, e.g. "sars-cov2"
  FILTER (?item != wd:Q79334742 ) # Paper about the 2003 epidemic

}

Try it!

Properties to remove edit

Properties to remove from outbreak items edit

# another property should be used
SELECT *
{
	?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361+ wd:Q81068910 .   
	?item p:P1339 ?_injured_statement .
	OPTIONAL { ?_injured_statement ps:P1339 ?number_injured } 
}

Try it!

# another property should be used
SELECT *
{
	?item wdt:P31 wd:Q3241045 . 
	?item wdt:P361+ wd:Q81068910 .   
	?item p:P1561 ?_survivors .
	OPTIONAL { ?_survivors ps:P1561 ?number_survivors } 
}

Try it!

Quick List edit

External links edit