PIOGGIA CUMULATA: SELECT sum(T.maxrain) as totrain FROM ((select MAX(CAST(rain AS DECIMAL(5,2))) AS maxrain, data from DatiStazioniDrop where IdStazione=35 AND data BETWEEN '2018-04-01' AND '2018-04-30' GROUP BY data) AS T);
PIOGGIA CUMULATA: SELECT sum(T.maxrain) as totrain FROM ((select MAX(CAST(rain AS DECIMAL(5,2))) AS maxrain, data from DatiStazioniDrop where IdStazione=35 AND data BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY data)AS T);

RIEPILOGHI MENSILI E ANNUALI DA FARE

RIEPILOGHI MENSILI

ESEGUO: INSERT INTO dropediacurrentmonthriepilogue (IdStazione, TMax, TMin, PMax,PMin, DPMax, DPMIN, WRMax, WCMin, RRMax, HIMax, URMax, URMin,totRain) VALUES (35,'25.5','7.3','1018.0','997.9','14.4','-15.0','49.9','5.0','5.0','23.9','94.0','15.0','13.00');

RIEPILOGHI ANNUALI

ESEGUO: INSERT INTO dropediacurrentyearriepilogue (IdStazione, TMax, TMin, PMax,PMin, DPMax, DPMIN, WRMax, WCMin, RRMax, HIMax, URMax, URMin,totRain) VALUES (35,'25.5','0.2','1028.8','985.8','14.4','-15.0','88.6','-5.0','53.8','23.9','96.0','15.0','579.00');