Skip to content

Instantly share code, notes, and snippets.

@ocorcho
Created May 26, 2016 09:54
Show Gist options
  • Save ocorcho/cf1e4a2117136b2b0277abb1a90c316b to your computer and use it in GitHub Desktop.
Save ocorcho/cf1e4a2117136b2b0277abb1a90c316b to your computer and use it in GitHub Desktop.
CRTM - Número de observaciones en un dPayPoint agrupados por TTP
SELECT DISTINCT ?tarjeta (COUNT (DISTINCT ?obs) AS ?numValidaciones) #?title ?perfil ?dPayPoint
WHERE {
?obs a <http://datos.crtm.es/recurso/transporte/Validacion> .
?obs ssn:observationResultTime ?time .
#?obs ssn:observedBy <http://datos.crtm.es/recurso/transporte/validacion/dpaypoint/25_L18_P846> .
?obs ssn:observedBy ?dPayPoint .
FILTER(?dPayPoint=<http://datos.crtm.es/recurso/transporte/validacion/dpaypoint/25_L18_P846>)
?obs ssn:featureOfInterest ?tarjeta .
#?obs ssn:observedProperty ?property .
?obs ssn:observationResult ?sensorOutput .
?sensorOutput ssn:hasValue ?obsValue .
?obsValue <http://datos.crtm.es/recurso/transporte/titulo> ?title .
?obsValue <http://datos.crtm.es/recurso/transporte/perfil> ?perfil .
#?obsValue ttp:validationProfile ?profile .
#?obsValue ttp:validationType ?type .
FILTER (?time >= "2016-01-01"^^xsd:date && ?time < "2016-02-01"^^xsd:date)
} GROUP BY ?tarjeta ORDER BY DESC(?numValidaciones)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment