A

Admin • 833.24K Points
Coach

Q. What is the significance of the statement "HAVING COUNT (emp_id)>2" in the following MySQL statement?
SELECT d.name, COUNT (emp_id) emp_no
FROM department d INNER JOIN Employee e
ON d.dept_id=e.emp_id
GROUP BY d.name
HAVING COUNT (emp_id)>2

  • (A) Filter out all rows whose total emp_id below 2
  • (B) -ln
  • (C) Filter out all rows whose total emp_id below 2 & Selecting those rows whose total emp_id>2
  • (D) None of the mentioned
  • Correct Answer - Option(C)
  • Views: 24
  • Filed under category MySQL
  • Hashtags:

Explanation by: Admin

This MySQL statement is designed to count employees in each department and display the department name and the number of employees. Let's break it down:

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.