Wikidata:WikiProject Medicine/Queries

From Wikidata
Jump to: navigation, search

Home

 

Properties

 

Data models

 

Items and Queries

 

Literature

 


Lists

 


Queries[edit]

# Items that are in the tree below medicine, medical-condition, medical-procedure, or pharmaceutical drung and missing an en-label
SELECT DISTINCT ?item ?itemLabel WHERE {
  { ?item wdt:P31*/wdt:P279* wd:Q11190 }
  UNION  {
    ?item wdt:P31*/wdt:P279* wd:Q12136 .
  }
  UNION {
    ?item wdt:P31*/wdt:P279* wd:Q796194 .
  }
  UNION {
    ?item wdt:P31*/wdt:P279* wd:Q12140 .
  }
  FILTER NOT exists { ?item rdfs:label ?enlabel filter (lang(?enlabel) = "en") } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Try it!

# Map of hospitals
SELECT ?item ?itemLabel ?coord
WHERE
{
    ?item wdt:P279*/wdt:P31* wd:Q16917 .
    ?item wdt:P625 ?coord .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Try it!