Jours chauds
Quel est le nombre de jours chauds pour l'année 2019
Calcul avec la température moyenne journalière :
SELECT COUNT(?T_avg)
WHERE {
SELECT ?jour ?mois (AVG(?value) AS ?T_avg)
WHERE { GRAPH inrae_graph:2019 {
?obs a sosa:Observation.
?obs sosa:observedProperty inrae_property:air_temperature.
?obs sosa:resultTime ?timeStamp.
?obs sosa:hasResult ?res.
?res qudt:numericValue ?value.
BIND (DAY(?timeStamp-"PT6H"^^xsd:duration) AS ?jour).
BIND (MONTH(?timeStamp-"PT6H"^^xsd:duration) AS ?mois).
FILTER ( YEAR(?timeStamp)=2019 )
}}
GROUP BY ?mois ?jour
HAVING (?T_avg > 25)
ORDER BY ?mois ?jour
}
WHERE {
SELECT ?jour ?mois (AVG(?value) AS ?T_avg)
WHERE { GRAPH inrae_graph:2019 {
?obs a sosa:Observation.
?obs sosa:observedProperty inrae_property:air_temperature.
?obs sosa:resultTime ?timeStamp.
?obs sosa:hasResult ?res.
?res qudt:numericValue ?value.
BIND (DAY(?timeStamp-"PT6H"^^xsd:duration) AS ?jour).
BIND (MONTH(?timeStamp-"PT6H"^^xsd:duration) AS ?mois).
FILTER ( YEAR(?timeStamp)=2019 )
}}
GROUP BY ?mois ?jour
HAVING (?T_avg > 25)
ORDER BY ?mois ?jour
}