Sorry Azhar ,its my fault , here I am attaching sample of my Input and out structures:
Material | Price | Cat |
-------- | ------ ---- | |
900 | 10.00 | 11 |
900 | 5.00 | 12 |
900 | 3.00 | 13 |
900 | 7.00 | 14 |
901 | 20.00 | 15 |
901 | 25.00 | 11 |
901 | 23.00 | 12 |
901 | 27.00 | 13 |
....
....
....
output should be
900 | 3.00 | 13 |
901 | 23.00 | 12 |