Check out example codes for "INSERT INTO GBP Plus(Index Change) VALUES( AND((SELECT NUMINDEX FROM GBP WHERE ID>ID-1) - (SELECT NUMINDEX FROM GBP WHERE ID=ID ))". It will help you in understanding the concepts better.

Code Example 1

INSERT INTO GBPPlus(IndexChange)
VALUES( ABS((SELECT NUMINDEX FROM GBP WHERE ID>ID-1) - (SELECT NUMINDEX FROM GBP WHERE ID=ID ))

Learn ReactJs, React Native from akashmittal.com