Computer Science, asked by bhuvirat, 1 month ago

Consider the query: SELECT department_id, AVG(salary)FROM employees WHERE
AVG(salary) > 8000 GROUP BY department_id;
There is an error.
THEY GWLERS
ORA-00934: group function is not allowed here. What will be the correct reason for the error?
Select one:
O All the options
O You cannot use group functions in the WHERE clause.
O You cannot use group functions in the SELECT clause.
You cannot use group by clause without HAVING clause​

Answers

Answered by rohithspacejet
0

Answer:

option 2

Explanation:

You cannot use group functions in the WHERE clause.

Answered by shilpa85475
0

You cannot use group functions in the WHERE clause.

Explanation:

A WHERE clause in SQL specifies that it is a  SQL Data Manipulation Language.

It should only affect rows that meet the specified criteria.

The SQL WHERE clause is used to extract only those results from a SQL statement, such as: SELECT, INSERT, UPDATE, or DELETE statement.

We can say that the WHERE clause is used to filter records.

It is used to extract only those records that fulfil a required condition.

Similar questions