Template:SPARQL Box

Documentation icon Template documentation[view · edit · history · purge ]

SPARQL Box is a template to create SPARQL queries in MediaWiki.

The main difference with the popular {{SPARQL}} template is that it does not show the syntax of the query and directly link to the result.

For example, it is used by {{Notebook Given name}}.

Usage edit

{{SPARQL Box
|label = Nature of items with {{Label|P735}} {{Label|Q346047}} 
|query =SELECT ?nature ?natureLabel (COUNT(?item) AS ?count) WHERE {
  ?item wdt:P735 wd:Q346047;
    wdt:P31 ?nature.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?nature ?natureLabel
ORDER BY DESC (?count)
}}

See also edit