Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT ?sensor, MAX(?DAY), MAX(?hour), AVG(?observationValue), MAX(?observationValue), MIN(?observationValue)
- WHERE {
- GRAPH ?g {
- ?s <uri://opensheffield.org/properties#sensor> ?sensor .
- ?s a <http://purl.oclc.org/NET/ssnx/ssn#ObservationValue> .
- ?s <http://purl.oclc.org/NET/ssnx/ssn#endTime> ?observationTime.
- ?s <http://purl.oclc.org/NET/ssnx/ssn#hasValue> ?observationValue .
- ?sensor <http://purl.oclc.org/NET/ssnx/ssn#MeasurementProperty> <http://dbpedia.org/resource/NO2> .
- BIND (bif:subseq( STR( ?observationTime ),0,11) AS ?DAY) .
- BIND (bif:subseq( STR( ?observationTime ),11,13) AS ?hour) .
- BIND (bif:subseq( STR( ?observationTime ),0,13) AS ?dayhour) .
- FILTER ( xsd:date(?observationTime) > xsd:date("2014-10-13") && xsd:date(?observationTime) <= xsd:date("2014-11-13") )
- }
- }
- GROUP BY ?sensor ?dayhour
- ORDER BY ?dayhour ?sensor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement