Modèle:SPARQL/documentation

Description
Ce modèle sert à insérer une requête SPARQL vers Wikidata et un lien vers celle-ci.
Syntaxe

{{SPARQL|query=requête wikidata}}

Exemple
  • {{SPARQL|query= select ?article ?articleLabel where { ?articlefrwart schema:about ?article . ?articlefrwart schema:inLanguage "fr" . filter not exists { ?article wdt:P31{{!}}wdt:P279 ?val } . OPTIONAL { $article rdfs:label $articleLabel . FILTER(lang($articleLabel) = "fr") } } LIMIT 100 }}
  • Aperçu :
SELECT ?article ?articleLabel WHERE {
     ?articlefrwart schema:about ?article . 
     ?articlefrwart schema:inLanguage "fr" . 
     filter not exists { ?article wdt:P31|wdt:P279 ?val } .
   OPTIONAL {
     $article rdfs:label $articleLabel .
     FILTER(lang($articleLabel) = "fr")
   }
} LIMIT 100

Cliquez pour essayer !

Voir aussi
  • {{lien SPARQL}} (pour faire un lien sans afficher le code SPARQL lui-même)