How to select the records corresponding to max "LIMIT" when "FG" and "WW" are same?
How to select the records corresponding to max "LIMIT" when "FG" and "WW" are same?
for
FG---------WW--------LIMIT-------QTY---------QTY2
A---------2004/12---------6---------2001---------1000
A---------2004/12---------10---------2001---------2000
A---------2004/07---------6---------3200---------1000
A---------2004/06---------6---------2040---------1000
B---------2004/22---------10---------2121---------4000
B---------2004/22---------22---------2121---------2222
B---------2004/22---------8---------2121---------2000
B---------2004/15---------8---------1221---------2000
B---------2004/15---------10---------1221---------4000
B---------2004/12---------8---------2212---------2000
B---------2004/12---------10---------2212---------4000
C---------2004/27---------9---------2222---------3000
C---------2004/27---------12---------2222---------22222
C---------2004/23---------12---------3332---------22222
C---------2004/23---------9---------3332---------3000
C---------2004/09---------9---------21323---------3000
How to select the records corresponding to max "LIMIT" when "FG" and "WW" are same?
for
FG---------WW--------LIMIT-------QTY---------QTY2
A---------2004/12---------6---------2001---------1000
A---------2004/12---------10---------2001---------2000
A---------2004/07---------6---------3200---------1000
A---------2004/06---------6---------2040---------1000
B---------2004/22---------10---------2121---------4000
B---------2004/22---------22---------2121---------2222
B---------2004/22---------8---------2121---------2000
B---------2004/15---------8---------1221---------2000
B---------2004/15---------10---------1221---------4000
B---------2004/12---------8---------2212---------2000
B---------2004/12---------10---------2212---------4000
C---------2004/27---------9---------2222---------3000
C---------2004/27---------12---------2222---------22222
C---------2004/23---------12---------3332---------22222
C---------2004/23---------9---------3332---------3000
C---------2004/09---------9---------21323---------3000