Jump to content

Template:SPARQL/doc

From Wikipedia, the free encyclopedia

Example

[edit]

This code

{{SPARQL|query=#Chats, avec des images
#added before 2016-10
#defaultView:ImageGrid
SELECT ?item ?itemLabel ?pic
WHERE
{
?item wdt:P31 wd:Q146 .
?item wdt:P18 ?pic
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
}}

Will give with a launch button for Wikidata query service:

#Chats, avec des images
#added before 2016-10

#defaultView:ImageGrid
SELECT ?item ?itemLabel ?pic
WHERE
{
?item wdt:P31 wd:Q146 .
?item wdt:P18 ?pic
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}

Click here to launch the Wikidata query

No description.

Template parameters

ParameterDescriptionTypeStatus
SPARQL query codequery

no description

Stringrequired