SELECT a.assigned_to_workno from (SELECT DISTINCT(assigned_to_workno) from issue ) a
where a.assigned_to_workno not in
(SELECT work_no FROM employee WHERE is_active = 'y');
SELECT * FROM issue WHERE assigned_to_workno in
(SELECT a.assigned_to_workno from (SELECT DISTINCT(assigned_to_workno) from issue ) a
where a.assigned_to_workno not in
(SELECT work_no FROM employee)
);
网友评论