Hello all, This is my table and records. Mcno ItemNo Date shft gram F03 101004 2016-01-12 4 24.76F03 101004 2016-01-12 3 0.00F03 101004 2016-01-12 2 0.00F03 101004 2016-01-12 1 24.70F03 101004 2016-01-11 4 24.76F03 101004 2016-01-11 3 0.00F03 101004 2016-01-11 2 24.40I am looking for below result. I am looking gram that should be previous shift as mention below. Pleas help me to write query.F03 101004 2016-01-12 4 24.76F03 101004 2016-01-12 3 24.70F03 101004 2016-01-12 2 24.70F03 101004 2016-01-12 1 24.70F03 101004 2016-01-11 4 24.76F03 101004 2016-01-11 3 24.40F03 101004 2016-01-11 2 24.40
↧