MySQL Forums
Forum List  »  Newbie

Month on Month Calculations
Posted by: N Rajkumar V Nagarethinam
Date: September 03, 2018 09:47AM

Dear All

How can i calculate Month on Month Calculation in MySQL 5.7. There is no lag function in MySQL 5.7.

My DB contains is as follow

Date State Value
(dd/mm/yy)
1/1/2017 01 25
1/1/2017 02 35
1/2/2017 01 45
1/2/2017 02 58
1/3/2017 01 68
1/3/2017 02 78

I need the output as below

Date State Value MoM
1/3/2017 01 68 XX%
1/2/2017 01 45 XX%
1/1/2017 01 25
1/3/2017 02 78 XX%
1/2/2017 02 58 XX%
1/2/2017 02 35

Thank you

N Rajkumar

Options: ReplyQuote


Subject
Written By
Posted
Month on Month Calculations
September 03, 2018 09:47AM
September 03, 2018 01:35PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.