To find the maximum salary paid in each job category of each department from the EMPLOYEES table, we need to group the data by department and job category and then find the maximum salary within each group.
The correct statement to achieve this is:
B. SELECT dept_id, job_cat, MAX(salary)
Explanation:
Option A) SELECT dept_id, job_cat, MAX(salary) - This option includes all the necessary columns and the MAX(salary) function to find the maximum salary. This is the correct statement.
Option B) SELECT dept_id, job_cat, MAX(salary) - This option is the correct statement as it includes all the necessary columns and the MAX(salary) function to find the maximum salary.
Option C) SELECT dept_id, MAX(salary) - This option does not include the job_cat column, so it will not show the maximum salary per job category. Therefore, this option is incorrect.
Option D) SELECT dept_id, salary - This option does not include the MAX(salary) function to find the maximum salary. It will simply display the salary column for each department. Therefore, this option is incorrect.
The correct answer is B. SELECT dept_id, job_cat, MAX(salary). This statement includes all the necessary columns and the MAX(salary) function to find the maximum salary paid in each job category of each department.