Home » MYSQL » MySQL GROUP BY » Question
  1. 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
    1. Aggregation of the field “name” of table “department”
    2. Sorting of the field “name”
    3. Aggregation of the field “name” of both table
    4. All of above
    5. None of these
Correct Option: A

“GROUP BY” clause s used for aggregation of field.

Your comments will be displayed only after manual approval.