Consider the table 'Company'. XYZ wanted to display the highest salary of each department along with department names.
Table: Company
EMPID |
DEPARTMENT |
SALARY |
E101 |
PERSONNEL |
60,000 |
E102 |
PERSONNEL |
65,000 |
E103 |
MARKETING |
40,000 |
E104 |
PERSONNEL |
62,004 |
E105 |
PERSONNEL |
50,000 |
E105 |
MARKETING |
35,000 |
XYZ entered the following SQL statement:
Select Department, MAX (Salary)
From Company
ORDER BY Department;
Identify error(s) in the above SQL statement.
Rewrite the correct SQL statement.