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