Task: Text to Code
Input (English): Step 1: For each row in departments table, find the corresponding rows in job_history table.
Step 2: find the number of different EMPLOYEE_ID of each value of job_history's DEPARTMENT_ID in the results of step 1.
Step 3: find without repetition departments's DEPARTMENT_ID in the results of step 1 whose corresponding value in step 2 is greater than or equals 4
Output (English): SELECT DISTINCT T1.DEPARTMENT_ID FROM departments AS T1 JOIN job_history AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY T2.DEPARTMENT_ID HAVING Count ( DISTINCT T2.EMPLOYEE_ID ) > = 4