Accumulated daily value

Dear all,

I would like to have the accumulated daily value for each period of time (5 min basis). This script get his value for 1 day but I need since the 12 am of the current day. Any idea?

var query_EgenBestAcc = ‘SELECT sum("‘EgenBestAcc’") as “EgenBestAcc” FROM "’ + db + ‘".“autogen”."‘90100000’"’

var result_dailyAcc = batch

Thank you