I have 2 table in mysql callde 'Complaint' and 'Action'. I want to get the last action taken for each complaint. Tables are:
Complaint:
complaint_id    complaint_title
--------------------------------
1               Abc complanint
2               Xyz complaint
3               Dummy Complaint
Action:
ser_id    complaint_id    action_id    action_date
1         1               1            2018-09-05
2         1               2            2018-09-07
3         1               3            2018-09-10
4         2               1            2018-09-08
5         3               1            2018-09-15
6         3               2            2018-09-18
now I want to get the result like:
ser_id    complaint_id    action_id    action_date
3         1               3            2018-09-10
4         2               1            2018-09-08
6         3               2            2018-09-18
 
     
     
    