SELECT temporary_acting, head_ID, department_ID FROM management WHERE "head_ID" <= 5 OR "department_ID" >= 11 UNION SELECT temporary_acting, head_ID, department_ID FROM management WHERE "head_ID" = 4 OR "department_ID" < 7 OR temporary_acting != "Yes" <table_name> : management col : department_ID | head_ID | temporary_acting row 1 : 2 | 5 | Yes row 2 : 15 | 4 | Yes row 3 : 2 | 6 | Yes row 4 : 7 | 3 | No row 5 : 11 | 10 | No <table_name> : management col : department_ID | head_ID | temporary_acting row 1 : 2 | 5 | Yes row 2 : 15 | 4 | Yes row 3 : 2 | 6 | Yes row 4 : 7 | 3 | No row 5 : 11 | 10 | No
col : temporary_acting | head_ID | department_ID row 1 : No | 3 | 7 row 2 : No | 10 | 11 row 3 : Yes | 4 | 15 row 4 : Yes | 5 | 2 row 5 : Yes | 6 | 2