Modèle:SPARQL
Documentation
Cette documentation est incluse dans la sous-page de documentation (voir | modifier | historique). Si vous voulez améliorer ce modèle et si celui-ci est protégé, demandez à un administrateur de vous aider.
- 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
- Voir aussi
{{lien SPARQL}}
(pour faire un lien sans afficher le code SPARQL lui-même)