Left join get last record of right table