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-07-01' AND '2018-07-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,'28.6','18.8','1012.4','1006.6','22.8','5.6','49.9','18.3','0.0','31.1','93.0','33.0','0.40');

RIEPILOGHI ANNUALI

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