Mysql cumulative segment query problem

SELECT a.time,a.ss,SUM(lt.ss)  as cum 
FROM zz a  JOIN zz lt 
ON a.time >= lt.time where a.time BETWEEN 20171201 and 20171231
GROUP BY a.ss
ORDER BY time;

how to query cumulative results in segments. The starting data accumulate from 0. Instead of adding it up over a period of time,
is like the result of the start of 20171201 above. Not 0, but the cumulative result of values from 20171101 to 20171130

Mar.06,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39be3-3456a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39be3-3456a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?