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-01-31' 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,'18.2','5.1','1018.4','997.1','11.1','-12.8','83.7','2.2','42.2','16.7','96.0','21.0','121.20');

RIEPILOGHI ANNUALI

ESEGUO: INSERT INTO dropediacurrentyearriepilogue (IdStazione, TMax, TMin, PMax,PMin, DPMax, DPMIN, WRMax, WCMin, RRMax, HIMax, URMax, URMin,totRain) VALUES (35,'18.2','5.1','1018.4','997.1','11.1','-12.8','83.7','2.2','42.2','16.7','96.0','21.0','121.20');