SELECT id, time24FROM ( SELECT t1.id,t1.time24, t1.time48, t1.time72, t1.time96, t1.timegt96, t1.total, t1.type, t1.platform FROM scs_delivery_time_line t1 UNION ALL SELECT t2.id,t2.time24, t2.time48, t2.time72, t2.time96, t2.timegt96, t2.total, t2.type, t2.platform FROM scs_delivery_time_line_copy t2) tblGROUP BY id, time24HAVING count(*) = 1