Très clair, merci
Je propose :
select all
tstamp, pluie_jour,
from_unixtime(tstamp) as _debug_tstamp_as_date,
sum(pluie_jour) over (order by tstamp asc) as cumul_courant_pluie_jour
from minimaxiarchive
where tstamp between unix_timestamp('2023-01-01 00:00:00') and unix_timestamp('2023-12-23 23:59:59');
Ce qui va donner :
tstamp pluie_jour _debug_tstamp_as_date cumul_courant_pluie_jour
------ ---------- --------------------- ------------------------
1672614000 3 2023-01-01 23:00:00 3
1672700400 0 2023-01-02 23:00:00 3
1672786800 1.2 2023-01-03 23:00:00 4.2
1672873200 1.4 2023-01-04 23:00:00 5.6
...
1703199600 6.2 2023-12-21 23:00:00 883.2000000000004
1703286000 1 2023-12-22 23:00:00 884.2000000000004
1703372400 1.8 2023-12-23 23:00:00 886.0000000000003
Partager