+1 vote
in Class 12 by kratos

Consider the table 'Hotel' given below :

                  **Table: HOTEL**

| EMPID | Category | Salary |
| E101 | Manager | 60000 |
| E102 | Executive | 65000 |
| E103 | Clerk | 40000 |
| E104 | Manager | 62000 |
| E105 | Executive | 50000 |
| E106 | Clerk | 35000 |

Mr. Vinay wanted to display average salary of each Category. He entered the following SQL statement. Identify error(*) and Rewrite the correct SQL STATEMENT.

ELECT Category, Salary

FROM Hotel

GROUPS BY Category;

1 Answer

+2 votes
by kratos
 
Best answer

SELECT Category,AVG( Salary) FROM HOTEL GROUP BY CATEGORY

...