Below is my query.
SELECT n.`name`,n.`customer_id`,m.`msn`, m.kwh,
m.kwh - LAG(m.kwh) OVER(PARTITION BY n.`customer_id` ORDER BY m.`data_date_time`) AS kwh_dif
MAke an outer Query
SELECT
`name`,`customer_id`,`msn`, SUM(kwh_diff) kwh_diff
FROM
(
SELECT n.`name`,n.`customer_id`,m.`msn`, m.kwh,
m.kwh - LAG(m.kwh) OVER(PARTITION BY n.`customer_id` ORDER BY m.`data_date_time`) AS kwh_diff
FROM mdc_node n
INNER JOIN `mdc_meters_data` m ON n.`customer_id` = m.`cust_id`
WHERE n.`lft` = 5 AND n.`icon` NOT IN ('folder')
AND m.`data_date_time` BETWEEN NOW() - INTERVAL 30 DAY AND NOW() ) t1
GROUP BY `name`,`customer_id`,`msn`