I want to find percentage change of Open Interest for every Scrip in the table (previous day's Open Interest value being the base value) in MySQL
SELECT 
  y.Trade_date,x.Scrip, 
  (((y.Open_Interest - x.Open_Interest)/x.Open_Interest)*100)
     AS Change_in_OI from stock_future x 
JOIN stock_future y 
  ON y.Scrip = x.Scrip 
  AND y.Trade_date = '2020-03-17' 
WHERE x.Trade_date = '2020-03-16';