Im having a table with notes. Below is a small sample of data of my db.
Id register_no name classification possibility
1 112 Ben Red 10%
2 112 Ben Red 10%
3 113 Ben Red 20%
4 112 Ben Amber 30%
5 112 Ben Amber 10%
6 113 Ben Amber 30%
7 113 Ben Red 10%
8 112 Ben Red 50%
I’m sorry i interpreted the question in a wrong manner.
Actually what i wanted is to retrieve the last inserted record for each register_no because sales_log table holds a list progress...
for an example Register_no 112 has 12 records in the database and the last record is 90% (it progressed from 10,40,60% so all of these records are in the db)
what i want is to get the 90% of register_no 112 and so on... its not just one record... there is around 500 register_no and i want to get the last entry for each register_no
hope it makes sense this time