[RESOLU] Recherche du maximum
J'ai une table qui contient les champs suivant :
- Index_Mesures
- Dates_Mesures
- Températures
- Humidité
- Point_Rosé
Je doit extraire la mesure maximum et la date correspondante, mais je seche ?
j'ai essayer ça :
Code:
1 2 3 4 5 6 7
|
SELECT MAX(TEMPERATURE) as MAX_TEMP,DATE_MESURES
FROM dbo.MESURES
WHERE INDEX_SERVEUR=6 and TEMPERATURE<9999 and CONVERT(varchar,DATE_MESURES,105)
BETWEEN CONVERT(varchar,DATEADD(day,-5,getdate()),105) and CONVERT(varchar,getdate(),105)
GROUP BY DATE_MESURES,TEMPERATURE
ORDER BY TEMPERATURE DESC |
Mais une seul valeur m'interesse
D'avance merci