Project:SPARQL/examples: Difference between revisions

Jump to navigation Jump to search
Line 156: Line 156:
</sparql>
</sparql>


==== Map of entities listed as affiliations ====
This query returns a map of all entities referred to as affiliations (such as academic departments, hospital departments, universities, and other types of organizations) by authors of academic works.
<sparql tryit="1">PREFIX wd: <https://lgbtdb.wikibase.cloud/entity/>
PREFIX wdt: <https://lgbtdb.wikibase.cloud/prop/direct/>
#defaultView:Map
SELECT ?affiliation ?affiliationLabel ?coor
WHERE
{
  ?item wdt:P838 ?affiliation. # Returns entities referred as as affiliations across all items.
  ?affiliation wdt:P638 ?coor . # Returns instances of affiliations with geographic coordinates available.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en (English) language
}
</sparql>


=== Identifiers ===
=== Identifiers ===

Navigation menu