Project:SPARQL/examples: Difference between revisions

Jump to navigation Jump to search
Line 263: Line 263:


= Federated queries =
= Federated queries =
== Everything that took place in a certain country==
<SPARQL tryit="1">
PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT DISTINCT ?item ?itemLabel ?place ?placeLabel
WHERE
{
?item wbt:P27 ?place.
?place wbt:P1 ?wikidataQ.
BIND(URI(concat("http://www.wikidata.org/entity/", ?wikidataQ)) AS ?wikidata_iri)
SERVICE <https://query.wikidata.org/sparql> {
?wikidata_iri wdt:P17 wd:Q34. # Sweden
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
}
ORDER BY ?placeLabel
</SPARQL>
== Map of all event locations ==
== Map of all event locations ==
<SPARQL tryit="1">
<SPARQL tryit="1">

Navigation menu