SPARQL/Templates

Within Wikidata Query Service Query Helper the comment #TEMPLATE can build a simple template where the user can choose one or more variables to change a query without needing to know the SPARQL query language.

See below an example to select presidents and their spouses from any country:

The "template" contains the texts and one ore more variables. The "variables" list the variables and optionally a "query" to select possible values, in this case ?id is instance of country.
 * If no query is needed the syntax is "?var1":{} In that case that might be

#TEMPLATE={"template":"Presidents of ?country and their spouses","variables":{"?country":{} } } Mind: BIND(wd:Q30 AS ?country) is used as a default for the variable ?country.