...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 717
Consider the following EMP table and answer the question below:


Which of the following select statement should be executed if we need to display the average salary of employees who belongs to grade “E4”?
A
Select avg(salary) from EMP whose grade=”E4”;
B
Select avg(salary) from EMP having grade=”E4”;
C
Select avg(salary) from EMP group by grade where grade=”E4”;
D
Select avg(salary) from EMP group by grade having grade=”E4”;
Question 717 Explanation: 
→ Condition specified in WHERE clause is used while fetching data (rows) from table, and data which doesn’t pass the condition will not be fetched into result set,
→ HAVING clause is used to filter summarized data or grouped data.
→ In the question, we require average salary of employees whose grade is E4. So we require grouped data.
Correct Answer: D
Question 717 Explanation: 
→ Condition specified in WHERE clause is used while fetching data (rows) from table, and data which doesn’t pass the condition will not be fetched into result set,
→ HAVING clause is used to filter summarized data or grouped data.
→ In the question, we require average salary of employees whose grade is E4. So we require grouped data.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!