A named query is a SPARQL SELECT query that may be created and edited directly in Callimachus.


Named queries provide “result sets” or answers to questions asked using the SPARQL Query Language. The result sets can be visualized as pie charts, line charts, annotations on Google maps and so on.

Creating named queries

To create a named query, select Named query using the create menu from the folder you wish to store the named query in. You will be presented with the following initial code:

# @Cache-Control:
# @view
PREFIX xsd: <>
PREFIX rdf: <>
PREFIX rdfs: <>


See Using Named Queries for more details.

Example Named Query

Here is an example of a named query that shows pollution levels over time.

    PREFIX owl: <>
    PREFIX skos: <>
    PREFIX tri: <>
    PREFIX : <#>

    SELECT DISTINCT ?year ?pounds
    WHERE {
    ?tri_facility owl:sameAs <>
    ; tri:has_report ?report .

    ?report tri:reports_release_of ?chem
    ; tri:reporting_year ?year
    ; tri:released_to ?location .

    ?chem skos:prefLabel “$chemical” .

    ?location tri:amount_in_pounds ?pounds
    ; tri:environmental_medium <> .

    } order by ?year

Here is the result set displayed as a graph.

Source: A Real-World Linked Open Data Story