SELECT table1.signout_id as id1,; table1.claim_id,; MAX(table2.insdttm),table2.*; from signout table1; inner JOIN signout2 table2; ON table1.signout_id=table2.signout_id; GROUP BY 1,2the table2.* data must belong to the table2 record with the highest insertdatetime (insdttm)