i.eis.luzzu-webapp.2.0.1.source-code.GetLatestObservedValuesForDataset.sparql Maven / Gradle / Ivy
The newest version!
PREFIX daq:
PREFIX rdf:
PREFIX rdfs:
PREFIX xsd:
PREFIX sdmx-dimension:
SELECT DISTINCT ?metric ?value {
?obs a daq:Observation ;
daq:metric ?metric_instance ;
daq:value ?value ;
sdmx-dimension:timePeriod ?dateTime
# This filter eliminates any solution (triples) that
# have a date time older than the newest observation
FILTER NOT EXISTS {
?obs2 daq:metric ?metric_instance ;
sdmx-dimension:timePeriod ?newerDateTime .
FILTER (?newerDateTime > ?dateTime)
}
?metric_instance a ?metric .
} ORDER BY ASC(?metric)