Task: Text to Code
Input (English): Step 1: For each row in employees table, find the corresponding rows in job_history table.
Step 2: find rows of the results of step 1 whose SALARY greater than 8000 or job_history's DEPARTMENT_ID equals 12000
Output (English): SELECT * FROM employees AS T1 JOIN job_history AS T2 ON T1.EMPLOYEE_ID = T2.EMPLOYEE_ID WHERE T1.SALARY > 8000 OR T2.DEPARTMENT_ID = 12000