I have created this table in SQL database;
index  Reg_No   Payment  Payday
1      S001     100      2017/01/01
2      S001     500      2017/02/01
3      S002     400      2017/01/01
4      S002     1000     2017/11/01
I need to group this by reg_no and also show the latest payment only. So, final result should look like this.
index    Reg_No    Payment    Payday
2        S001      500        2017/02/01
4        S002      1000       2017/11/01
How can I write the SQL query for this.
 
     
     
     
    