Task: Text to Code
Input (English): Step 1: For each row in departments table, find the corresponding rows in employees table.
Step 2: find the  FIRST_NAME in the results of step 1 whose DEPARTMENT_NAME not equals M ordered ascending by EMPLOYEE_ID
Output (English): SELECT T2.FIRST_NAME , T2.LAST_NAME , T2.SALARY FROM departments AS T1 JOIN employees AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.DEPARTMENT_NAME ! = "M" ORDER BY T2.EMPLOYEE_ID Asc