MySQL GROUP BY
- What is the significance of the statement “HAVING COUNT (emp_id)>2” in the given query?
SELECT dep.name, COUNT (emp_id) emp_no
FROM department dep INNER JOIN Employee em
ON dep.dept_id=em.emp_id
GROUP BY dep.name
HAVING COUNT (emp_id) > 2
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
“HAVING” clause are worked similar as “WHERE” clause.
- What is the significance of the statement “GROUP BY d.name” in the given query?
SELECT p.name, COUNT (emp_id) Per_no
FROM Person p INNER JOIN Employee em
ON p.per_id=em.emp_id
GROUP BY p.name
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
“GROUP BY” clause s used for aggregation of field.
- Which clause is used with an “aggregate functions”?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
“GROUP BY” is used with aggregate functions.
- Which of the following belongs to an “aggregate function”?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
MIN/MAX, COUNT and SUM/AVG are belongs to an “aggregate function”.
- What is the meaning of “GROUP BY” clause in Mysql?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Group data by column values