Project:SPARQL/examples: Difference between revisions

Jump to navigation Jump to search
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Voorbeelden==
==Voorbeelden==
<big>''De queries op deze pagina worden in de Voorbeelden-dropdown op https://kbtestwikibase.wikibase.cloud/query/ weergegeven.''</big>


=== Overview of properties (Ps) in this Wikibase, with their Labels, Descriptions and Aliases, both in NL and in EN, as well their equivalent properties in Wikidata (if applicable) ===  
=== Overview of properties (Ps) in this Wikibase, with their Labels, Descriptions and Aliases, both in NL and in EN, as well their equivalent properties in Wikidata (if applicable) ===  
Line 155: Line 156:
   ?item kbwdt:P1 ?wikidataEquivalentURI.
   ?item kbwdt:P1 ?wikidataEquivalentURI.
   #Retrieve some data from Wikidata
   #Retrieve some data from Wikidata
  SERVICE <https://query.wikidata.org/sparql>{
  OPTIONAL {?wikidataEquivalentURI wdt:P18 ?wdImage.}
  OPTIONAL {?wikidataEquivalentURI wdt:P6379 ?wdWorksInCollection.
          ?wdWorksInCollection rdfs:label ?wdWorksInCollectionLabelNL.
          FILTER(LANG(?wdWorksInCollectionLabelNL) = "nl").} 
}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl". }
}
ORDER BY ASC(xsd:integer(STRAFTER(STR(?item), 'Q')))
</sparql>
=== Federated querying: mixing data from this Wikibase with data from the NTA in data.bibliotheken.nl (via the PPN) -- TODO!!!!!!!!! ===
<sparql tryit="1">
# Federated querying: mixing data from this Wikibase with data from the NTA in data.bibliotheken.nl (via the PPN)
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX kbwdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
PREFIX kbwd: <https://kbtestwikibase.wikibase.cloud/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription
?wikidataEquivalentURI
?wdImage #P18 image from Wikidata
?wdWorksInCollection ?wdWorksInCollectionLabelNL
WHERE
{
  VALUES ?item {kbwd:Q10 kbwd:Q29} # Louis Auguste Gustave Doré + Theun de Vries
  ?item kbwdt:P1 ?wikidataEquivalentURI.
  #Retrieve some data from data.bibliotheken.nl
   SERVICE <https://query.wikidata.org/sparql>{
   SERVICE <https://query.wikidata.org/sparql>{
   OPTIONAL {?wikidataEquivalentURI wdt:P18 ?wdImage.}
   OPTIONAL {?wikidataEquivalentURI wdt:P18 ?wdImage.}
emailconfirmed
952

edits

Navigation menu