dataMgr:data: update M() method

Update M() method to directly calculate Moveing Average Value
using SQL to improve performance.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>