We must first form groups of employee tuples based on their DNO and sex attributes (grouped by department number and sex)
And then compute average Salary and count the SSN of employees:
DNO sex Avg Count +--------+-----------+------------+------+ | 4 | M | 45000 | 2 | +--------+-----------+------------+------+ | 5 | M | 60000 | 1 | +--------+-----------+------------+------+ | 5 | F | 50000 | 1 | +--------+-----------+------------+------+ |