Project:SPARQL/examples: Difference between revisions

From Resistance in Belgium
(Created page with "==== Test template SPARQL ==== {{SPARQL|query= PREFIX wb: <https://data.arch.be/entity/> PREFIX wbt: <https://data.arch.be/prop/direct/> PREFIX wdq: <https://query.wikidata.org/bigdata/namespace/wdq/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?item ?label ?_image WHERE { ?item wbt:P1 wb:Q2. SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . ?item rdfs:label ?label } } }}")
 
No edit summary
Line 3: Line 3:


{{SPARQL|query=
{{SPARQL|query=
PREFIX wb: <https://data.arch.be/entity/>
PREFIX arch: <https://data.arch.be/entity/>
PREFIX wbt: <https://data.arch.be/prop/direct/>
PREFIX archt: <https://data.arch.be/prop/direct/>
PREFIX wdq: <https://query.wikidata.org/bigdata/namespace/wdq/>
PREFIX archq: <https://query.wikidata.org/bigdata/namespace/wdq/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>



Revision as of 13:35, 7 August 2024

Test template SPARQL

PREFIX arch: <https://data.arch.be/entity/>
PREFIX archt: <https://data.arch.be/prop/direct/>
PREFIX archq: <https://query.wikidata.org/bigdata/namespace/wdq/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>


SELECT ?item ?label ?_image WHERE {
  ?item wbt:P1 wb:Q2.
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr" . 
    ?item rdfs:label ?label
  }
}

Try it!