PrepAway - Latest Free Exam Questions & Answers

Which SQL statement should be used to select the minimum and maximum salaries (SALARY), by job code (JOB), fro

Which SQL statement should be used to select the minimum and maximum salaries (SALARY), by
job code (JOB), from a table EMPLOYEE?

PrepAway - Latest Free Exam Questions & Answers

A.
SELECT job, MIN(salary), MAX(salary)
FROM employee
GROUP BY job;

B.
SELECT job, MIN(salary), MAX(salary)
FROM employee
ORDER BY job;

C.
SELECT job, MIN(salary), MAX(salary)
FROM employee
GROUP BY job, MIN(salary), MAX(salary);

D.
SELECT JOB, MIN(salary), MAX(salary)
FROM employee
ORDER BY job, MIN(salary), MAX(salary);

Explanation:


Leave a Reply