use hotlunch; select school_num,school_name,ordered_by_num,ordered_by_type,schedule_num,max(added_date),count(*) from hotlunch_order_header as hloh,schools as s where hloh.school_num = s.record_num group by 1,2,3,4,5 having count(*) > 1;