This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Q07
Eugene Siow edited this page Sep 8, 2017
·
4 revisions
These queries are adapted from SRBench.
###Q7 Detect stations that are recently broken. PREFIX om-owl: http://knoesis.wright.edu/ssw/ont/sensor-observation.owl# PREFIX xsd: http://www.w3.org/2001/XMLSchema# PREFIX owl-time: http://www.w3.org/2006/time#
SELECT ?sensor
WHERE {
?sensor om-owl:generatedObservation ?observation.
?observation om-owl:samplingTime ?instant .
?instant owl-time:inXSDDateTime ?time .
FILTER (?time>"2003-04-01T00:00:00"^^xsd:dateTime && ?time<"2003-04-01T01:00:00"^^xsd:dateTime)
}
GROUP BY ?sensor
HAVING (count(?time) = 0)
SELECT
'http://knoesis.wright.edu/ssw/System_4UT01' AS sensor
FROM
_4UT01
WHERE
_4UT01.time>'2003-04-01T00:00:00'
AND _4UT01.time<'2003-04-01T01:00:00'
GROUP BY
'http://knoesis.wright.edu/ssw/System_4UT01'
HAVING
count(_4UT01.time)=0