hehe, let me explain in this mode: if you have
select emp_id, dept_id from employees group by dept_id
you will get one row for each unit, and one emp_id, not guaranteed by anyone. This means that big data is being poured into departments.
if you shoot
select emp_id, dept_id from employees group by dept_id, emp_id
You will get data separated by departments and emps.
But if you are group by null , it means that you are not sharing anything. You have one group. And mysql will provide you with emp_id and a department not guaranteed from which row.
source share